Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

How to restrict a measure?


Sorry if it sounds silly but i want to use a KPI to display sales for current quarter independently of what selection user make.

I tried Sum({<[Date.autoCalendar.YearQuarter]={'2017-Q1'}>}Sales) and it works.

How can I make the year-quarter value dynamic instead of fix value? I want the KPI to display current year-quarter data.

3 Replies
Valued Contributor

Re: How to restrict a measure?

Use a filter for YearQuarter and try use like Sum({<[Date.autoCalendar.YearQuarter]={"$(Max(YearQuarter))"}>}Sales) in the expression. Or you can even use a variable by assigning a value to it from input box.

Valued Contributor II

Re: How to restrict a measure?

Hello Sara,

You can try below given expression. This will show you Sales Total irrespective of current selection.

Sum({<[Date.autoCalendar.YearQuarter]={"$(=Year(Today()) & '-Q' & If(Ceil(Month(Today())/3) >=2, Ceil(Month(Today())/3)-1, Ceil(Month(Today())/3) + 3))"}>}Sales)

Hope this will be helpful.



Contributor III

Re: How to restrict a measure?

Hi Sara,

use dynamic variables in place of values.



Community Browser