Qlik Community

Qlik Sense App Development

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

Highlighted
ercmntkkl
New Contributor

Dynamic date range in set analysis

Hello everyone,

I have 2 variable one of is vFirstMonth keeps constant value of 01. And the other ona is vSelectedMonth which data comes from variable input drop down options. 

Lets say i choose 03 for vSelectedMonth from dropdown list.

I would like to calculate total sales between these months range[01,03]. I wrote the formula below, search in blog and tried them also but, couldn't work it correctly.

sum({<[TakvimAyı]={">=$(=vFirstMonth) <=$(=vSelectedMonth)"}>}[TotalSales per Employee])

Where am i doing wrong?

thanks in advance.

2 Replies
vmoreno2605
Contributor

Re: Dynamic date range in set analysis

Is your value really '01'? or is it '1', because if the answer is '01' it wouldnt work since qlik thinks it's a string. 

 

And if you have a constant value of 01 why do you need it? 

ercmntkkl
New Contributor

Re: Dynamic date range in set analysis

Hello,

When I try sum({<[TakvimAyı]={">$(=vSecilenAy)"}>}[Cost per Emplooye MTD]) or  sum({<[TakvimAyı]={"$(=vilkay)"}>}[Cost per Emplooye MTD]) it gives correct value. Value of constant variable and dynamic variable 01 work fine.

If any other idea to give range filter can you share with me?