Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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