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

AGGR Function

I want to create the dynamic aggr expression for a group dimension using dollar expression.

Plz do the needful

thnx in advance

Regards,

Qliker

1 Solution

Accepted Solutions
swuehl
MVP
MVP

When using volume as dimension, you probably don't have a unique ExRate per dimension value, so you need to use an aggregation function:

sum(AGGR(sum(Price*qty)/Avg(ExRate), Country, [$(=GetCurrentField(Group1))]))


or


sum(AGGR(sum(Price*qty/ExRate), Country, [$(=GetCurrentField(Group1))]))

or any other appropriate aggregation.

Use Aggregation Functions!

View solution in original post

6 Replies
sunny_talwar

Would you be able to provide more details? What is the group name, what is the expression... etc?

narendiran
Partner - Creator
Partner - Creator

Hi Abhishek,

Please follow the below steps to do dynamic aggr

  1. In Document Properties | Groups, create a group called Cycle1 with ProdID and Month as the dimensions:
  2. Edit the straight table and add Cycle1 as the second dimension.
  3. Save the changes and look at the chart. Note that the expressions do not calculate correctly for all the different cycle values.
  4. Open the properties of the table and edit the Sales $ expression:
    Sum( AGGR(Sum(Price*Qty)/ExRate, Country, [$(=GetCurrentField(Cycle1))]) )
  5. Click on OK to save the chart:
  6. Click on the cycle button and confirm that the values calculate...

Kushal_Chawda

Just create cyclic group

Did you know..? Cyclic Group

further you can dynamically use the Aggr with cyclic group like in below thread

How to use AGGR on a Cyclic Group

akpofureenughwu
Creator III
Creator III

Sahal.. Please for clarity sake, help us with some details. Cheers

Not applicable
Author

i Have created the cyclic group(Group1) with two dimensions(curr,vol)

and m using this expressiion

sum(AGGR(sum(Price*qty)/ExRate, Country, [$(=GetCurrentField(Group1))]))

And m getting the value only for currency field not for volume.

Thanks to all for giving the appriciated efforts.

Regards,

Qliker.

swuehl
MVP
MVP

When using volume as dimension, you probably don't have a unique ExRate per dimension value, so you need to use an aggregation function:

sum(AGGR(sum(Price*qty)/Avg(ExRate), Country, [$(=GetCurrentField(Group1))]))


or


sum(AGGR(sum(Price*qty/ExRate), Country, [$(=GetCurrentField(Group1))]))

or any other appropriate aggregation.

Use Aggregation Functions!