Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
below is the data:
We can see in week 1 ,top 5 Store of all region = region1 (3) + region2 (2);in week 2 ,top 5 Store of all region = region1 (1) + region2 (4).
I can use to calculate the result of one week:
count({<Week={"1"}>}distinct aggr(
if(num(rank(sum({<Week={"1"}>}QtySold),1,1))<=5,
Store_Name),Store_Name));
count({<Week={"2"}>}distinct aggr(
if(num(rank(sum({<Week={"2"}>}QtySold),1,1))<=5,
Store_Name),Store_Name));
But I need both two week result together in one chart,like below:
could anyone can solve it?Thanks!
@Nora104 try below
count(distinct aggr(if(num(rank(sum(QtySold),1,1))<=5,Store_Name),Week, Store_Name))
Another way could be like this
=Count(DISTINCT Aggr(If(Rank(Sum(QtySold)) < 6, Store_Name), Week, Store_Name))
Have you given it a try yet, by summing both expressions?
I need to show 52 weeks, it is too long to write 52 formula......
@Nora104 try below
count(distinct aggr(if(num(rank(sum(QtySold),1,1))<=5,Store_Name),Week, Store_Name))
Another way could be like this
=Count(DISTINCT Aggr(If(Rank(Sum(QtySold)) < 6, Store_Name), Week, Store_Name))
It works well! Thank you so much!
It works well! Many Thanks!!