Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
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!

Tags (1)
Labels (3)
1 Solution

Accepted Solutions

Re: Compute a subtotal value with aggr on all rows?

Try this

Aggr(NODISTINCT Sum(WeightFull), WaveFullName)

or

Sum(TOTAL <WaveFullName> WeightFull)

 

View solution in original post

6 Replies

Re: Compute a subtotal value with aggr on all rows?

Try this

Aggr(NODISTINCT Sum(WeightFull), WaveFullName)

or

Sum(TOTAL <WaveFullName> WeightFull)

 

View solution in original post

Partner
Partner

Re: Compute a subtotal value with aggr on all rows?

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! 🙂

Re: Compute a subtotal value with aggr on all rows?

Partner
Partner

Re: Compute a subtotal value with aggr on all rows?

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?

Re: Compute a subtotal value with aggr on all rows?

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

Partner
Partner

Re: Compute a subtotal value with aggr on all rows?

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