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: 
bhaddour
Contributor II
Contributor II

HELP Count ifs

Hi everyone, 

I've been struggling with this for a while. I'm new in Qlik sense !

I have a table and this is the header ( data loaded ) 

Customer type could be : FR or WH

Creation date(SAP) format : September 1, 2017

Capture.PNG

and I want total of FR customers created previous month and current month, and same thing for WH. 

Capture2.PNG

It should be easy I don't know why it's not working... 

 

Please help

Labels (1)
4 Replies
Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

Try this

Current Month  

Count({$<Creation date={">=$(=Monthstart(max(Creation date)))<=$(=Monthend(max(Creation date)))"},

[Customer type]={'FR'}>}[Customers])

Previous Month

Count({$<Creation date={">=$(=Monthstart(AddMonths(max(Creation date),-1)))<=$(=Monthend(AddMonths(max(Creation date),-1)))"},[Customer type]={'FR'}>}[Customers])

Hope this helps

Thanks

Thanks and Regards
Kashyap.R
bhaddour
Contributor II
Contributor II
Author

Hi, 

It doesn't work ..

dwforest
Specialist II
Specialist II

You have to replace Creation date in @Kashyap_R's answer with the date from your dataset, include [ ] or "" if spaces

Kashyap_R
Partner - Specialist
Partner - Specialist

Hi

Share a sample QVF, I will try and get you back.

Thanks

Thanks and Regards
Kashyap.R