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

Expression help with if

=sum(if([Expense Month-Year]='Mar-2016' ,

            if([Expense Month-Year]='Apr-2016',

(Aggr((Max([Amount of Expense]) * Pick(Match(pay_frequency, 'Monthly', 'Quarterly', 'Annually', 'Semi Annually','One Time'), 12, 4, 1, 2,1)),%SubspaceKey,[Expense Type],%ExpenseKey))))

but the below expresson with one if is working fine.

=sum(if([Expense Month-Year]='Mar-2016' ,

         

(Aggr((Max([Amount of Expense]) * Pick(Match(pay_frequency, 'Monthly', 'Quarterly', 'Annually', 'Semi Annually','One Time'), 12, 4, 1, 2,1)),%SubspaceKey,[Expense Type],%ExpenseKey)))


How can I put it for multiple if's.Thank you.

Labels (1)
5 Replies
sunny_talwar
MVP
MVP

Sure, try this:

Sum(If(Match([Expense Month-Year], 'Mar-2016', 'Apr-2016'),

Aggr((Max([Amount of Expense]) * Pick(Match(pay_frequency, 'Monthly', 'Quarterly', 'Annually', 'Semi Annually','One Time'), 12, 4, 1, 2,1)),%SubspaceKey,[Expense Type],%ExpenseKey)))

Not applicable
Author

Its returning 0

sunny_talwar
MVP
MVP

Are you using this in a chart or text box object?

Not applicable
Author

In charts..Bar chart,straight table

sunny_talwar
MVP
MVP

Would it be possible to share a sample?