Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use a default value for a KPI calculation if nothing is selected

Hi,

I'm looking for a solution to use a default value for a KPI caluclation if nothing is selected.

E.g:

The KPI must have a selected year. If no year is selected, no data is displayed.

So in that case, I want to use a default value (2014 for example).

Is there any chance?

additional note: I'm talking about Qlik Sense

1 Reply
Not applicable
Author

Hi,

You could write an expression like

IF(GetSelectedCount([Year])=0,

     Sum( {<[Year]={'2014'}>} [Value]),

     Sum( [Value])

)

This is the most basic form just as an example, you can use dollar sign expansion to make the expression more dynamic if required.

Thanks