Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
hufernandes
Contributor
Contributor

Difference between two months

Hello everyone, I am currently trying to display in one of my panels the difference between two subsequent periods (in my case those are months) but untill now I haven't had success with it yet.

 

My most recent try was deffining a variable called vPriorMonth with the following code: 

let vPriorMonth  = '=month(addmonths((Date),-1))';

and then the following measure:

Delta_Esgotos =  Count(Situacao_Esgoto)-count({<Month={'$(vPriorMonth)'}>}Situacao_Esgoto)

 

But It is not working (the seccond part of the "Delta_Esgotos" is returning zero.

 

Any ideas on what im doing wrong?

 

0 Replies