Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
venky77777
Contributor III
Contributor III

Getting 0 for previous month Sales when selecting month filter in Qliksense

Hi,

Can you help me on getting 0 for previous month Sales when selecting month in month filter.

Whenever selecting or changing month in month filter only current month total sales is showing, prev month sales showing 0. If I select 2 months in month filter the both values are showing.

Prev Month-----Sum({< PDate = {">=$(=date(monthstart(Max(PDate),-1),'DD-MM-YYYY'))<=$(=date(monthend(Max(PDate),-1),'DD-MM-YYYY'))"},PDate= >} Sales)

without selecting Month in filter

venky77777_1-1718551307623.png

After selecting month in filter

venky77777_0-1718551275792.png

 

 

 

Labels (5)
2 Replies
Antoine04
Partner - Creator III
Partner - Creator III

Try with  "Month=" in your set analysis, something like :

Prev Month-----Sum({< PDate = {">=$(=date(monthstart(Max(PDate),-1),'DD-MM-YYYY'))<=$(=date(monthend(Max(PDate),-1),'DD-MM-YYYY'))"},PDate=, Month= >} Sales)

Regards

Antoine

venky77777
Contributor III
Contributor III
Author

If I add month=,Pdate= then I'm getting some random value as in below image

venky77777_0-1718637190791.png

Actual Prev. value is 113123.7. Can any one help on this.