Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
rahul8273
Contributor
Contributor

Comparing 2 measures which are at different level of aggregation.

Hi Community,

In one my use case I want to compare the 2 measures which are in different level of aggregation.

For Example

Measure 1 : Avg(Aggr(Sum(Profit)/Sum(Sales), YearMonth, Product))

Measure 2 : Avg(Aggr(Sum(Profit)/Sum(Sales), YearMonth, Product, Country))

Now in my final output viz I will have Product on Rows and Country on Col (in pivot table) and in the values I want to show the difference between the measure1 and measure 2.

It may be straightforward but I am stuck on this.

 

Labels (1)
1 Reply
jbhappysocks
Creator II
Creator II

Hi

Change measure 1 to Avg(total <Product> Aggr(Sum(Profit)/Sum(Sales), YearMonth, Product))

(If you add YearMonth to the pivot it's total <Product, YearMonth>)