Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sum if with multiple acceptable ifs

I'm trying to use a sum if where I want it to accept multiple values to sum on, but I'm guessing my syntax is wrong as I'm not getting the value I'd like

Here's what it looks like

Sum(if([YearQuarter]='2017Q3', if([YearQuarter]='2017Q4', if([YearQuarter]='2018Q1', if([YearQuarter]='2018Q2',Reg90Inc)))))

What is the proper way to write this sum?

2 Replies
kenkuchana
Contributor II
Contributor II

Sum({< [YearQuarter]={'2017Q3','2017Q4',’2018Q1',’2018Q2’}>} Reg90Inc)

el_aprendiz111
Specialist
Specialist

Hi,

1-option:

=if(WildMatch(YearQuarter,'2017Q1','2017Q2','2017Q3','2017Q4'),SUM(Reg90Inc),0)