Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
Can you explain with sample data...
Regards,
Can you explain with sample data...
Regards,
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]) .
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
I pasted the wrong image..
tried this expression as well : aggr(*** , Territory, [ADC Prayer Name]). Still not working.
It worked.
Then in what cases we use AGGR function?
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