Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help with Expression Total

Hi Guys

I am trying to get a expression total to show on a straight table but i am struggling to place my aggr or sum values in the right position so the total will appear. Below is the expression itself. If there is more need in explanation let me know.

(sum([WIS - Curing Bin])-(sum([WIS - Curing Bin])/[Sample Wis Mass])*([Sample Dis Mass]*(100-[Sample DIS Moisture]))/(100-1.5))/sum([WIS - Curing Bin])*100

kind regards

3 Replies
sunny_talwar

Have you looked at the possibility of using Total Mode where it sums up all the rows for your (third option)

Capture.PNG

Mark_Little
Luminary
Luminary

Hi,

I am not a hundred percent on what you are trying to achieve or can't test with out some example data, but logically i think below is what you are trying to achieve.

((sum([WIS - Curing Bin])-(sum([WIS - Curing Bin])/[Sample Wis Mass])*([Sample Dis Mass]*(100-[Sample DIS Moisture]))/(100-1.5))/sum([WIS - Curing Bin]))*100

Mark

rubenmarin

Hi Ashley, If some field can have more than one value you need to say QV what to do with those values using an aggretation function (Sum, Avg, Concat...), I bold in your expression the part wich I think can cause troubles in totals:

(sum([WIS - Curing Bin])-(sum([WIS - Curing Bin])/[Sample Wis Mass])*([Sample Dis Mass]*(100-[Sample DIS Moisture]))/(100-1.5))/sum([WIS - Curing Bin])*100

Another option is use Aggr() function, that function can return many values based on the dimensions used as parameters, but again you need to say what to do with those values, ie:

Sum(Aggr((sum([WIS - Curing Bin])-(sum([WIS - Curing Bin])/[Sample Wis Mass])*([Sample Dis Mass]*(100-[Sample DIS Moisture]))/(100-1.5))/sum([WIS - Curing Bin])*100, YourTableDimension1, YourtableDimension2, ...))