Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

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
Highlighted

Re: Expression

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
Highlighted

Re: Expression

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

Highlighted
Creator
Creator

Re: Expression

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

Highlighted
Creator
Creator

Re: Expression

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!

Highlighted
Creator
Creator

Re: Expression

Got it now.. Thanks for your help Sunny!

Highlighted

Re: Expression

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...