Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello eveybody,
I'm working on key numbers and would like to get some help. On my dashboard, I have something that looks like this:
As you can see to the left (Net Sales), I have also calculated net sales from last year (the blue numbers right next to it). If I'd like to do the same with for an example Basket size, how do I do that? My expression for basket size is: "sum(Sales)/count(DISTINCT [%Order])" and the expression for last years sale is: "Sum({<Year = {'$(=Max(Year) -1)'}>} Sales)".
I would like to combine these expression somehow. Instead of Sales I'd like to put in the expression for Basket size, like this:
Sum({<Year = {'$(=Max(Year) -1)'}>}sum(Sales)/count(DISTINCT [%Order]))
But it doesn't work of course. How do I write this in the best possible way?
Sincerely,
Betty Habtemariam
I think you would need to apply the set expression to all aggregations:
sum({<Year = {'$(=Max(Year) -1)'}>}Sales) / count({<Year = {'$(=Max(Year) -1)'}>} DISTINCT [%Order])
Note that your current basket size seems to be calculated across all years available.
I think you would need to apply the set expression to all aggregations:
sum({<Year = {'$(=Max(Year) -1)'}>}Sales) / count({<Year = {'$(=Max(Year) -1)'}>} DISTINCT [%Order])
Note that your current basket size seems to be calculated across all years available.
Hi Swuehl,
Thank you VERY much! Your solution worked perfectly 😃 About my current Basket Size being calculated across all years available. The ones I'm doing it for wanted it that way.
Have a nice evening or day wherever you are 😃
Sincerely,
Betty Habtemariam