Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr function not working properly in Qlikview

We have a table with 2 dimension, territory and Payer name. We need to aggr one metric over Territroy but the function is giving 0 for most of the records and for others giving the correct value and this is happening within the same terriotry. Aggregated value should be same for all records within one terriotory.

Can anyone help me with this issue I am facing.

1 Solution

Accepted Solutions
PrashantSangle

Can you explain with sample data...

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

6 Replies
PrashantSangle

Can you explain with sample data...

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
zhadrakas
Specialist II
Specialist II

Hello Jyothi,

at the Moment you are aggregating over the field [ADC Prayer Name].

what about aggregating over both like aggr(*** , Territory, [ADC Prayer Name]) .

Anonymous
Not applicable
Author

Jyothi,

I don't think you need the Aggr function here i.e. the Sum() automatically aggregates [Total Rx Quantity] on Territory and [ADC Payer Name] anyway!

However, if you want [ADC Payer Name] to be disregarded in the aggregation, I think the Total qualifier will do the job.

Sum(TOTAL <Territory> [Total Rx Quantity])

I haven't tested the Total Qualifier with set expressions but hopefully it works fine for you.

Let us know how it goes,

Laleh

Not applicable
Author

I pasted the wrong image..

tried  this expression as well : aggr(*** , Territory, [ADC Prayer Name]). Still not working.Capture1.PNG

Not applicable
Author

It worked.

Then in what cases we use AGGR function?

Anonymous
Not applicable
Author

So, let's say you want to calculate the total values of [Total Rx Quantity] per Territory per [ADC Payer Name] without having to create a table with those two fields. In fact, Qlik will create a temporary table that holds an array of aggregared values and you can then apply another aggregation such as Avg, Max, Min, etc on the output(s).


Where you are able to create a table or chart with those dimensions, Aggr() is not needed.

Further reading on this:

Aggr - chart function ‒ QlikView

Hope that helps,

Laleh