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

Wrong Total

Hi, I am new to qliksense.

For simple IF statement, Total is showing wrong although the individual line items are populating correctly.

Here is the exp

If([credit field]='credit',

Sum([crate]*[percent]*[quantity]),

Sum([drate])*[percent]*[quantity]))

Credit field has credit and debit

Thanks

Labels (1)
2 Replies
Tanalex
Creator II
Creator II

You have one too many ) at the end.  This should work:

If([credit field]='credit',

SUM ([crate]*[percent]*[quantity]),

SUM ([drate])*[percent]*[quantity])

Vegar
MVP
MVP

Are you using this in an table? The default total in a table is expression total which could be different to the sum of all rows. Try changing your total aggregation to sum of row  to see if that gives you the expected output.