Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Mayur_Bisht
Contributor II
Contributor II

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.