Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI,
I have a table with countries and sales. No i have to display the top 3 countries in three different text boxes and their sales in the another three text boxes respectively.
Please suggest.
Thanks
Hi Vishnu,
Try like this,
For 1 st Rank in 1st text object:-
=Only(if(aggr(rank(sum(Sales)),Country)=1,Country))&'--'&sum({<Country={"=rank(Sum(Sales))=1"}>}Sales)
For 2 st Rank in 2st text object:-
=Only(if(aggr(rank(sum(Sales)),Country)=2,Country))&'--'&sum({<Country={"=rank(Sum(Sales))=2"}>}Sales)
.....Etc, Like rtry
Regards,
May be this
=FirstSortedValue(DISTINCT Country, -Aggr(Sum(Sales), Country), 1) & Chr(10) &
Max(Aggr(Sum(Sales), Country), 1)
=FirstSortedValue(DISTINCT Country, -Aggr(Sum(Sales), Country), 2) & Chr(10) &
Max(Aggr(Sum(Sales), Country), 2)
=FirstSortedValue(DISTINCT Country, -Aggr(Sum(Sales), Country), 3) & Chr(10) &
Max(Aggr(Sum(Sales), Country), 3)
Hi, see the attached .qvw file. Hope it helps you.
I guess it depends on what the output needs to look like? Would it be A & C or A or C as the top 1?