Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikSenseUser2
Contributor III
Contributor III

Totaling issues

I'm having an issue with this. I'm trying to get the MPG for both units, but it only shows the first unit's gallons for the total.

 

=Sum(LOADED_MILES+DEADHEAD_MILES+TOLL_MILES)/If(Sum(TRACTOR_GALLONS)>0,Sum(TRACTOR_GALLONS),Sum([T.Fuel Gallons]))

QlikSenseUser2_1-1642778369669.png

 

 

1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

I think you will need to wrap an AGGR round it, so something like;

Sum(Aggr(your expression, [Unit Num]))

Cheers,

Chris.

View solution in original post

4 Replies
chrismarlow
Specialist II
Specialist II

Hi,

Have you tried changing the Totals function to Sum or your expression?

20220121_1.png

Cheers,

Chris.

QlikSenseUser2
Contributor III
Contributor III
Author

Yes and changing the Totals function to Sum works for the table the only issue is I can't do that for the gauge 

QlikSenseUser2_0-1642784633890.png

 

chrismarlow
Specialist II
Specialist II

Hi,

I think you will need to wrap an AGGR round it, so something like;

Sum(Aggr(your expression, [Unit Num]))

Cheers,

Chris.

QlikSenseUser2
Contributor III
Contributor III
Author

Thanks!!! That worked.