Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bushpalaamarnat
Creator
Creator

Question on aggr function as facing issue in calculations

I have used following formula

aggr(Sum([Net Inventory]),Brand_Site)

and

Sum(total <[Market 2]>[Net Inventory])

am trying to calculate (brand total per site/ total site)*100.

when am selecting dimension brand the calculation dont happen? if i select site the formula Sum(total <[Market 2]>[Net Inventory]) works and the other one does not. this is wise versa issue.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Try exp:

Sum([Net Inventory])/Aggr(Sum(total <[Market 2]> [Net Inventory]),Brand_Site,[Market 2])

Capture.JPG

View solution in original post

10 Replies
tresesco
MVP
MVP

Could you post your sample qvw explaining expected output?

bushpalaamarnat
Creator
Creator
Author

how to attach the qvw, i can see an attach option?

tresesco
MVP
MVP

Check this:Uploading a Sample

bushpalaamarnat
Creator
Creator
Author

Thank you for the information so far. attached a sample qvw for your reference. Kindly assist.

my final out put should be something like this

   

% of Brand - Site
Brand- SiteNet Inventory%
Brand A - UK19050%
Brand C - UK9024%
Brand B - FR4020%
Brand B - UK6016%
Brand D - FR3115%
Brand D - UK4011%
Brand C - FR199%
Brand A - FR126%

and

 

Calculation for site
SiteTotal
UK380
FR202
Anil_Babu_Samineni

Not sure, Why you created another thread https://community.qlik.com/message/1410229?et=watches.email.thread#1410229

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tresesco
MVP
MVP

Try exp:

Sum([Net Inventory])/Aggr(Sum(total <[Market 2]> [Net Inventory]),Brand_Site,[Market 2])

Capture.JPG

bushpalaamarnat
Creator
Creator
Author

Perfect! thank you it is great help!

mdmukramali
Specialist III
Specialist III

Hi Neelima,

if it's solved your issue then please close the thread by selecting correct answer option

may be it will be helpful for others. bushpalaamarnath

Thanks,

Mukram.

bushpalaamarnat
Creator
Creator
Author

I really want to do that, mean it. However in this chain i do not have that option to select. Is there a way to do that, kindly let me know.