Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Qlik Insider - Maximize your investment, Join this webinar, May 26th. Register Today
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
Partner

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.