Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

How to sort for Top-n acount based on region & $ values

Hi Guys,

 

Can someone help me how i can sort the data based on the Rank of the customer & $ value.

 

Like i have 3 region X,Y,Z and based on the top 3 (highest sales i am getting the output) but it's not sorted.

 

I am looking like 

Region X --> Account 1 --> $20

                      Account 2 --> $10

                       Account 3 -->$5

Region Y --> Account 1 --> $18

                      Account 2 --> $10

                       Account 3 -->$3

Region Z --> Account 1 --> $12

                      Account 2 --> $11

                       Account 3 -->$10

 

Rank is my measure. Please suggest how i can sort like above.

 

Thanks appreciate your help.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please check if the chart in below screenshot is what you want? If yes, you can use the custom visual "Clustered Column Chart By Akvelon".

Get custom visual "Clustered Column Chart By Akvelon"Get custom visual "Clustered Column Chart By Akvelon"

top N account_updated.JPG

Best Regards

Rena

View solution in original post

7 REPLIES 7
amitchandak
Super User
Super User

As of Now Matrix Support, only single sort is supported

 After creating Stepped Layout, sort on the Measure and try

https://www.burningsuit.co.uk/blog/2019/04/7-secrets-of-the-matrix-visual/

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

it's not Matrix graph i am trying ,I am just trying to build the Top N account in bar graph like below.TopNAccount.PNG

Anonymous
Not applicable

Hi @Anonymous ,

You can complete the following steps to achieve the requirement:

1. create measures to get the top three accounts per region

sumvalue = SUM ( 'Customers'[Value] )
Top 3 account = 
VAR rankC =
    IF (
        HASONEVALUE ( 'Customers'[Customer] ),
        RANKX ( ALL ( 'Customers'[Customer] ), [sumvalue] )
    )
RETURN
    IF ( rankC <= 3, [sumvalue] )

2. Create Clustered bar chart and drag the related fields (Axis: Region  Legend: Customer  Value: [Top 3 account]) onto visual

top N account.JPG

Best Regards

Rena

Anonymous
Not applicable

Thanks @Anonymous  this result i got it can you sort like for X region it should come all 3 in sorted format based on the $ values.. and then Y for same and last Z.. Like below TopNAccount.PNG

Anonymous
Not applicable

Hi @Anonymous ,

Please check if the chart in below screenshot is what you want? If yes, you can use the custom visual "Clustered Column Chart By Akvelon".

Get custom visual "Clustered Column Chart By Akvelon"Get custom visual "Clustered Column Chart By Akvelon"

top N account_updated.JPG

Best Regards

Rena

Anonymous
Not applicable

Thanks It's working.

Anonymous
Not applicable

hi @Anonymous 

 

your idea is good but when i am having different accounts name for each region it's not working. In each region it's showing all accounts. Please suggest if there is any way to remove other account which are not belongs to that region

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.