Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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)