cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Syndicate_Admin
Administrator
Administrator

Get top 3 names based on the highest amount values and remaining will be Others

Hi

 

Need to obtain Top 3 Names based on their amounts  and remaining will fall under others and values of others will be sum all amounts except top 3 values.

Note:  amount is a measure Value

Sample Data

No Name Amount

1        a       10

2        b       15

3        c       30

4        d       40

5        e      50

 

Expected result

 

Name     Amount

e                 50

d                 40

c                 30

others     25

3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Can you just use a Top N filter on your visual?

Syndicate_Admin
Administrator
Administrator

Hi @satyajampani_86 

Create measures

rank = RANKX(ALLSELECTED('Table'),[amount],,DESC,Dense)

flag = IF([rank]<=SELECTEDVALUE('Table 2'[top n]),1,0)

Measure = IF(HASONEVALUE('Table'[Name]),IF([flag]=1,[amount],BLANK()),SUMX(FILTER(ALLSELECTED('Table'),[flag]=0),[amount]))

Capture11.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, 
Very nice approach. Is it possible to add more attributes? so besides top1-5 on value, there could be another value as well? and make 2 slicers so user decide which value he or she wants to see as 1-5? If yes, how to maintain it

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Users online (3,061)