Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jamelmessaoud
Creator II
Creator II

Expression

Hi guys,

Not sure this is possible but I would like to sum the output of this expression

if(Sum([Suppliers FTL Cost]) + Sum([Suppliers Drop Cost]) > Sum([Cust FTL Cost]) + Sum([Cust Drop Cost]),1,0)

So basically if the output is 6 lines of 1 I want to see 6! This is needed for a KPI basically.

Is it possible?

Thanks

J

1 Solution

Accepted Solutions
sunny_talwar

May be use like this

Sum(Aggr(if(Sum([Suppliers FTL Cost]) + Sum([Suppliers Drop Cost]) > Sum([Cust FTL Cost]) + Sum([Cust Drop Cost]),1,0), DimensionsHere))

Use the dimension/s where you are evaluating this condition

View solution in original post

5 Replies
sunny_talwar

May be use like this

Sum(Aggr(if(Sum([Suppliers FTL Cost]) + Sum([Suppliers Drop Cost]) > Sum([Cust FTL Cost]) + Sum([Cust Drop Cost]),1,0), DimensionsHere))

Use the dimension/s where you are evaluating this condition

jamelmessaoud
Creator II
Creator II
Author

Unfortunately that didn't work.  Still not giving me the total overall

jamelmessaoud
Creator II
Creator II
Author

if I change the totals function to Sum from Auto this gives me the total which I need, so I was hoping there would be a way to "total" the expression that I have..

Wishful thinking i think!

jamelmessaoud
Creator II
Creator II
Author

Got it now.. Thanks for your help Sunny!

sunny_talwar

Here is a good link from the help section.. this is for pivot table... but same is applicable in KPI object

http://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/ChartFunctions/NestedAggr...