Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a pivot table in which I am showing top 10 Clients and remaining in "Others". Clients that are bucket in "Others" category are shown in Text and Image box below the pivot table as seen in below image. Currently they are showing in alphabetical order. User wants them to be sorted based upon rank.
How can i achieve that?
Below is the formula used
=if(GetSelectedCount([Currency])=0 or Currency='EUR',
concat(
distinct if(
aggr(
rank(
Sum({<CSDR_Detection_Date_MonthEnd={'$(=$(vEndDate_1))'}>}Positive_EURAmount),1,1
),
CSDR_Counterparty_Name
) >= 11 and Positive_EURAmount<>0,
CSDR_Counterparty_Name
),
', '
),
concat(
distinct if(
aggr(
rank(
Sum({<CSDR_Detection_Date_MonthEnd={'$(=$(vEndDate_1))'}>}Positive_USDAmount),1,1
),
CSDR_Counterparty_Name
) >= 11 and Positive_USDAmount<>0,
CSDR_Counterparty_Name
),
', '
)
)
Hello Please find formula for reference which worked on the testing data
Formula:
Concat(
Aggr(
If(Rank(Sum(Sales)) > 10, Client),
Client
),
', ',
Aggr(Rank(Sum(Sales)), Client)
)
Thanks
Hello Please find formula for reference which worked on the testing data
Formula:
Concat(
Aggr(
If(Rank(Sum(Sales)) > 10, Client),
Client
),
', ',
Aggr(Rank(Sum(Sales)), Client)
)
Thanks
Thanks Ysalvi,
Aggr and rank again at the end helped in sorting them by rank. This is final formula that worked
=if(GetSelectedCount([Currency])=0 or Currency='EUR',
concat(
if(
aggr(rank(Sum({<CSDR_Detection_Date_MonthEnd={'$(=$(vEndDate_1))'}>}Positive_EURAmount),1,1),CSDR_Counterparty_Name)>=11
and aggr(Sum({<CSDR_Detection_Date_MonthEnd={'$(=$(vEndDate_1))'}>}Positive_EURAmount),CSDR_Counterparty_Name)<>0,
CSDR_Counterparty_Name),
',',
aggr(rank(Sum({<CSDR_Detection_Date_MonthEnd={'$(=$(vEndDate_1))'}>}Positive_EURAmount),1,1),CSDR_Counterparty_Name)
),
concat(
if(
aggr(rank(Sum({<CSDR_Detection_Date_MonthEnd={'$(=$(vEndDate_1))'}>}Positive_USDAmount),1,1),CSDR_Counterparty_Name)>=11
and aggr(Sum({<CSDR_Detection_Date_MonthEnd={'$(=$(vEndDate_1))'}>}Positive_USDAmount),CSDR_Counterparty_Name)<>0,
CSDR_Counterparty_Name),
',',
aggr(rank(Sum({<CSDR_Detection_Date_MonthEnd={'$(=$(vEndDate_1))'}>}Negative_USDAmount),1,1),CSDR_Counterparty_Name)
)
)