Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

cancel
Showing results for 
Search instead for 
Did you mean: 
mcatek
Partner
Partner

Compute a subtotal value with aggr on all rows?

Hello there,

I'm new to Qlik Sense and I really like this product! I have done many things alone until today but I have a little issue that I can't find the reason...

What I want to do is to compute a sub-total value on all rows, which you may find in the attached screenshot. As you might see, there is one row where is written 161,43 and the others are blank.

How can I repeat 161,43 on all the rows? I used the aggr() formula as below:

Aggr( Sum ( WeightFull ), WaveFullName)

WaveFullName is the first column of my dataset. So the only issue is to repeat that 161,43 on all rows but I can't do that. I tried to use the Max() function with Aggr() or FirstSortedValue() but it doesn't work.

Thanks for the help!

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Try this

Aggr(NODISTINCT Sum(WeightFull), WaveFullName)

or

Sum(TOTAL <WaveFullName> WeightFull)

 

View solution in original post

6 Replies
sunny_talwar

Try this

Aggr(NODISTINCT Sum(WeightFull), WaveFullName)

or

Sum(TOTAL <WaveFullName> WeightFull)

 

mcatek
Partner
Partner
Author

Hello Sunny,

Both of your solutions works! Thank you very much! I wasn't aware of the NoDistinct keyword...

But the second solution is very strange to me, as I didn't know this kind of syntax:

Sum(TOTAL <WaveFullName> WeightFull)

Is that a Set Analysis clause? Where may I find the documentation about this syntax?

Anyway, thank you very much for your help! 🙂

sunny_talwar

mcatek
Partner
Partner
Author

Thank you, but I was thinking about the <WaveFullName> part. This looks like a Set Analysis expression but I'm not aware of this kind of syntax?
sunny_talwar

Field within <> just define the scope of aggregation..... The link I provided didn't really mention it, but try this one

https://www.wisdomjobs.com/e-university/qlik-view-tutorial-537/using-the-total-qualifier-15275.html

mcatek
Partner
Partner
Author

Okay I understand now! Thank you very much Sunny! 🙂