Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Aag
Contributor III
Contributor III

Set analysis Sum of Averages..

Hello all, I am new to Qlik and need help 

I need to do a calculation sum(Sales)/sum(Profit). 

I am calculating Num and denominator separately, and I have to calculate ony for certain category types.. 

For Numerator, I created Measure1 :  Sum{<Category= {'ABC','DEF'}>} Sales)

For Denominator, I created Measure2: Need to first calculate the average :  Avg({<Category= {'ABC','DEF'}>} Profit)

How do I calculate sum of Measure2? using set analysis? 

 

 

Labels (1)
1 Solution

Accepted Solutions
Taoufiq_Zarra

@Aag  If I understood correctly are you looking for measure 2 this ?

sum(aggr(Avg({<Category= {'ABC','DEF'}>} Profit),Dimension(s)))

Dimension(s)-> Dimension1,Dimension2... => dimensions you use in the chart

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra

@Aag  If I understood correctly are you looking for measure 2 this ?

sum(aggr(Avg({<Category= {'ABC','DEF'}>} Profit),Dimension(s)))

Dimension(s)-> Dimension1,Dimension2... => dimensions you use in the chart

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Aag
Contributor III
Contributor III
Author

Awesome! This calculation did the trick!! Thanks a ton @Taoufiq_Zarra