Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Read about Qlik’s Response to COVID-19 Read the Letter, Join the Group.
Contributor

Help with Aggr() function

I have an expression using aggr() that I'm struggling with. I'm trying to show Extended Avg Selling Price (Quantity* Avg Selling Price) for CM supplier using a Pivot table. But the total value is not being summed up correctly.


The expression I've used is

if(Match(Dimensionality( ),0,1,2), sum(aggr(sum(Quantity)*[Avg Selling Price],[Purchase Order])), sum(Quantity)*[Avg Selling Price])


I appreciate any help... Thanks!

1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: Help with Aggr() function

Try

SUM(Quantity * [Avg Selling Price])

instead of

sum(Quantity)*[Avg Selling Price])

View solution in original post

3 Replies
Highlighted
MVP
MVP

Re: Help with Aggr() function

Try

SUM(Quantity * [Avg Selling Price])

instead of

sum(Quantity)*[Avg Selling Price])

View solution in original post

Highlighted
Honored Contributor

Re: Help with Aggr() function

May be:

if(Match(Dimensionality( ),0,1,2), sum(aggr(sum(Quantity)*Only([Avg Selling Price]),[Purchase Order])), sum(Quantity)*Only([Avg Selling Price]))

Highlighted
Contributor

Re: Help with Aggr() function

Thank you. It's working as expected.