Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

expression if equation > then sum

Hello

I need to calculate sum of a table and if the sum of each line with the same CALLER is more then 2000 then add up all the fields that are over 2000 and do some more calculations.

the expression seems to work in a pivott table and i get the fields that are over 2000 but the expression seems to get the wrong numbers in a text field.

the expression look like this

if(Sum(EKS) *-1 - sum(VARE)>2000, ((Sum(EKS) *-1 - sum(VARE) - (NumericCount (DISTINCT CALLER) * [KR])) *0.05))

if i add the values up manualy from the piviott i get 1669 but the text field gets 2033

table look something like this

CALLERdescEKSVARE
900blablabla 23410095
900blablabla 23423120100
905blablabla 2342323412
905blablabla 236444333
905blablabla 373121
952blablabla 237782211

any ideas?

0 Replies