Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I want to show a table showing top 10 account names with respect to the revenue generated by them.
so currently I'm showing a few columns in the table as- account name, revenue, region,etc.
I want to show only top 10 rows that generate the max revenue from these that too in the descending order. how do i do that?
You can create calculated dimension using Aggr() and Rank() functions to get top N revenue generating accounts.
Refer to this code template and disable "Include Null values" option
Aggr(
if(Rank(Total <Measure>) <= <Top n> , <Filter DIM>
)
,<All DIM List>
)
Below are few examples for some real world scenarios
Simple case:
Aggr(
if(Rank(Total Sum([Total Sale Amount])) <=10 ,Customer
)
,Customer, Region
)
Duplicate case:
=
Aggr(
if(Rank(Total Sum([Total Sale Amount])) <=10 ,Customer
)
,Customer, Region ,SalesRepresentative
)
Thanks a lot! Will try this