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

1 Reply
sunny_talwar

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]))