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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources 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

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.