Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Amberj_29
Contributor III
Contributor III

Sum, If and AND in Expression

Hello future helpers,

I am trying to do a Sum if with two different dimensions criteria. I have looked at other forums and have not found anything that works. Here are two ways I have been trying to make it work:

1.   

=(Sum(if(match([Date of report.autoCalendar.Month], 'Month1', 'Month2' and  [Edition], '2019'),

([Revenue]))))

This one just doesn't add up to the right values which is really annoying. I have tried adding a second 'MATCH' statement after the 'AND' statement and didn't really do anything. 

2. Sum([Date of report.autoCalendar.Month] = {'Month1'}, [Date of report.autoCalendar.Month] = {'Month2'},
[Edition] = {'Editiontype'}, [Revenue])

This formula I found on another forum and I tried to make it work with my data but it isn't. It is saying 'An error in expression: ')' expected. However the number of brackets are even on each side...

 

It is similar to a SUMifs in Excel,  but the forums on SUMifs haven't helped much either. Can anyone help me to where I may be making this mistake.  I am writing this expression in a table. 

Many thanks,

Labels (3)
1 Solution

Accepted Solutions
Channa
Specialist III
Specialist III

=sum({<[Date of report.autoCalendar.Month]={'Month1','Month2'},Edition={'2019'}>} Revenue)

Channa

View solution in original post

2 Replies
Channa
Specialist III
Specialist III

=sum({<[Date of report.autoCalendar.Month]={'Month1','Month2'},Edition={'2019'}>} Revenue)

Channa
Amberj_29
Contributor III
Contributor III
Author

Many thanks!