Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have this question,
Say I have two dimensions, country and date, each with 20 or more value;
I want to sum the value of sales on a pivot table with date as the dimension.
I want to use AGGR() because for each country there will be a different adjustment factor.
Anyone has any idea how to do this? Currently when I apply Sum(TOTAL<Country> aggr(sum(Sales)*Function,Country))
where the function is suppose to give different values according to the country selection.
It doesen't work. It give me one value in one of the date column and the rest is 0. I want it to give me the sum by different dates.
Any help/Insights will be really appreciated! Thank you!
Michael
Try sum(aggr(sum(Sales)*only(Function),Country,Date))
Try sum(aggr(sum(Sales)*only(Function),Country,Date))
Thank you very much Gysbert, it works! And the formula is clean and neat compare to the jumbo I had.
And it improves performance as well. I think how much it improves depends on how long the original formula is.
In my case it went down from ~3s to less than 2s.