Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I have a problem using a pivot table.
I have these columns:
Well, what I'd like to do is to calculate the percentage of the sales in every city, per week.
I need to find a way to calculate the ratio between SUM(SALES) and the subtotal (per week and city).
Could you please help me?
Many thanks in advance
I would rather use TOTAL without Aggr() here
Sum(Sales)/Sum(TOTAL <Country, City, Week> Sales)
Would you be able to provide a sample where we can help you? It would be also be helpful to know the expected output based on your provided sample
If you have all of the above columns in your pivot and your sales exp is like sum(Sales)
try something like this for the ratio:
sum(Sales) / aggr(sum(total Sales),Country,City,Week)
OR
sum(Sales) / sum(aggr(sum(total Sales),Country,City,Week))
I would rather use TOTAL without Aggr() here
Sum(Sales)/Sum(TOTAL <Country, City, Week> Sales)
Thank you Sunny and Qlikdeez for your quick answers
Indeed, Sunny, you have solved my problem (just one thing, after TOTAL I put only WEEK)... maybe I wrote the message in an unclear way..but you are both really really kind, and you helped me a lot!
Thank you