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: 
niha
Creator II
Creator II

Current Month and previous Month

Hi,

I want to create a KPI for current month and previous month. The calendrer is al ready there. I found results in below code for Year. 


Count({<[Insight Worked Date], FLG_Worked ={1}, action_taken -={'NULL'}, Year = {$(=Max(Year))}>}[%PK_COLs])

But for Month I tried

Count({<[Insight Worked Date],FLG_Worked={1},action_taken -={'NULL'},Month={$(=Max(Month))}>}[%PK_COLs])

But it is not working  as I get value 0 .

I also tried this code but it gives me  same value as I get for year.


Count({<[Insight Worked Date],FLG_Worked={1},action_taken -={'NULL'},Month={"=$(=Max(Month))"}>}[%PK_COLs])

Please suggest.

1 Reply
OmarBenSalem
Partner - Champion II
Partner - Champion II

You should try to know your data :

1) create a simple table with Month as dimension and 

Count({<[Insight Worked Date],FLG_Worked={1},action_taken -={'NULL'}>}[%PK_COLs])

as a measure.