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: 
triekong
Creator
Creator

Set Analysis and If(Count)

Dear Community

Please i need advise on the following:

Below is my formula works fine

=Sum({$<MonthYear = {">=$(=Date(AddMonths(Max(MonthYear), -11), 'MMM-YYYY'))<=$(=Date(Max(MonthYear), 'MMM-YYYY'))"}, Month, [Question Category]= {'Overall Customer Satisfaction'}>} [Question Score])

I need to update it to include an IF(Count), but am not sure where to place the If(count). this is so that the expected expression reads: If(COUNT(VOC_Number) >0, Perform the SUM above

i have tried placing it in the start of the expression, but it seems to affect the set analysis. Do i need an AGGR formula instead?

Please advise

Many Thanks

Labels (1)
1 Reply
sunny_talwar
MVP
MVP

May be this

=If(Count({$<MonthYear = {">=$(=Date(AddMonths(Max(MonthYear), -11), 'MMM-YYYY'))<=$(=Date(Max(MonthYear), 'MMM-YYYY'))"}, Month, [Question Category] = {'Overall Customer Satisfaction'}>} VOC_Number) >0, Sum({$<MonthYear = {">=$(=Date(AddMonths(Max(MonthYear), -11), 'MMM-YYYY'))<=$(=Date(Max(MonthYear), 'MMM-YYYY'))"}, Month, [Question Category]= {'Overall Customer Satisfaction'}>} [Question Score]))