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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

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

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

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/

 

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

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks @v-yiruan-msft  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

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks It's working.

Anonymous
Not applicable

hi @v-yiruan-msft 

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.