Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
sunil-kumar5
Creator II
Creator II

Adjustment in Previous Month Count

Hi Community,

 

I was showing the numbers of separated employees for previous month now I have to put one condition that if EMP_Status = LWP than it does not come under the count.

current using expression for last month count:- Count({<LYear={'$(=Year(Today()))'}, LMonth={'$(=Month(Addmonths(Today(),-1)))'}>} distinct EMP_CODE )

Please advise..

Thanks

4 Replies
PriyankaShivhare
Creator II
Creator II

 Count({<LYear={'$(=Year(Today()))'}, LMonth={'$(=Month(Addmonths(Today(),-1)))'},EMP_Status = -{'LWP'}>} distinct EMP_CODE )

MayilVahanan

Hi @sunil-kumar5 

For 2021 Jan, your expression will be like  LMonth = Dec  & LYear = 2021 and display zero values. 

So change the formula like below

Count({<LYear={'$(=Year(Addmonths(Today(),-1)))'}, LMonth={'$(=Month(Addmonths(Today(),-1)))'}, EMP_Status -={'LWP'}>} distinct EMP_CODE )

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
sunil-kumar5
Creator II
Creator II
Author

Thanks for the response, later on I was able to adjust it properly.

sunil-kumar5
Creator II
Creator II
Author

Thanks for the advise Mayil, I didn't realize that next year I have to make correction in my KPI's