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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Chennakesava458
Frequent Visitor

Custom Order in hierachical matrix visual

Hi Team,
 I have a requirment like 

Chennakesava458_1-1715852731355.png

we have 5 hierarchy levels
lower level need to show first then next level related records below is the sample data 

Chennakesava458_2-1715853005322.png

Can anybody please help on this..


 

1 ACCEPTED SOLUTION

Hi @Chennakesava458 ,

Base on my research, there is no option to set the row columns in reverse order. There is an workaround can be achieve the similar requirement. You can find the details in the attachment.

1. Create a sort order table

RowName SortOrder
employee1 1
employee2 2
Manager1 3
employee2 4
employee4 5
Manager2 6
Client1 7

2. Create a measure as below 

Measure = var _gl=SELECTEDVALUE('Sort Order'[RowName])
RETURN  CALCULATE(SUM('Table'[Sales]),'Table'[GL-4]=_gl||'Table'[GL-3]=_gl||'Table'[GL-2]=_gl)

vyiruanmsft_0-1715938787584.png

Best Regards

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

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi @Chennakesava458 ,

You can refer the following blog to sort the column by custom:

Sort a Column with a Custom Order in Power BI - RADACAD

1. Create a customized sort order dimension table

Quarter Year Order
Q2 2024 1
Q1 2024 2
Q4 2023 3
Q3 2023 4
... ...

2. Combining the Sort Order Table with 'Dimension' table

vyiruanmsft_0-1715913827729.png

3. Sort by column

vyiruanmsft_1-1715913827913.png

If the above one can't help you figure out, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And it is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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.

Hi Team,
    Based on  below sample data 

GL-2              GL-3          GL-4     Sales

employee1Manager1Client11500
employee2Manager2Client12500
employee2Manager1Client14000
employee4Manager2Client16800

 

if we create Matrix visual 

Chennakesava458_0-1715922264953.png

But my requiremnt is 

employee1    1500
employee2    4000
Manager1     5500
employee2    2500
employee4   6800
Manager2    9300
Client1        14800

Anybody Suggest how to achieve this

 

Hi @Chennakesava458 ,

Base on my research, there is no option to set the row columns in reverse order. There is an workaround can be achieve the similar requirement. You can find the details in the attachment.

1. Create a sort order table

RowName SortOrder
employee1 1
employee2 2
Manager1 3
employee2 4
employee4 5
Manager2 6
Client1 7

2. Create a measure as below 

Measure = var _gl=SELECTEDVALUE('Sort Order'[RowName])
RETURN  CALCULATE(SUM('Table'[Sales]),'Table'[GL-4]=_gl||'Table'[GL-3]=_gl||'Table'[GL-2]=_gl)

vyiruanmsft_0-1715938787584.png

Best Regards

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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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