Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
Not applicable

KPI with date variable

Hi experts!

I have this problem: I have a slider that set a DateVariable (VariableDate) defined like (=today()).

I need to show that variable with a KPI, and i simply added one formatted as Date with the expression =(VariableDate). (until this point everything ok)

I need also to set a kpi that shows the average of a field before the date i set with the slider. The expression I used is this one:

Avg({<FieldDate={'<=$(DateVariable)'}>} MyField)   but it does not show anything.

Anyone can help me?


Tags (2)
2 Replies

Re: KPI with date variable

May be try this:

Avg({<FieldDate={'<=$(=DateVariable)'}>} MyField)

Esteemed Contributor

Re: KPI with date variable

If the variable is already defined as =TODAY() why add another = ?

Avg({<FieldDate={'<=$(=DateVariable)'}>} MyField)

Maybe the quotes are the problem?


Avg({<FieldDate={"<=$(DateVariable)"}>} MyField) would do the trick?