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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Sorting in Matrix visual

Hi Experts,

 

I am facing a scenario which is  Column to be sorted descending order in Matrix visual.

 

I used year field in column header with subheader 2019,2020,2021. I cannot see the sorting option based on values in each year.

 

DhineshM_0-1628512606075.png       

DhineshM_1-1628512792214.png

 

If i sorted based on "Actual" column, only total actual values were sorted but i need individual column(like 2019/2020/2021) to be sorted upon clicking on it.

 

Is it possible to achieve like this?

 

Thanks.

 

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi,  @Anonymous 

The value of 2019 is part of the value in the original field. You can only sort the column as a whole.
As a workaround, please consider creating separate measures for the 2017, 2018, and 2019 , and apply these three measures to the value of the matrix.

 

2019 value = CALCULATE(YourMeasure,FILTER(Table,Table[Year]=2019))
2018 value = CALCULATE(YourMeasure,FILTER(Table,Table[Year]=2018))
2017 value = CALCULATE(YourMeasure,FILTER(Table,Table[Year]=2017))

 

...

45.png

Best Regards,
Community Support Team _ Eason

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

hi @Anonymous , @amitchandak ... This solution does not suit to me. I'm facing the same issue but I want to stay dynamical and that the user can sort by himself. How can I do it? Any idea?

v-easonf-msft
Community Support
Community Support

Hi,  @Anonymous 

The value of 2019 is part of the value in the original field. You can only sort the column as a whole.
As a workaround, please consider creating separate measures for the 2017, 2018, and 2019 , and apply these three measures to the value of the matrix.

 

2019 value = CALCULATE(YourMeasure,FILTER(Table,Table[Year]=2019))
2018 value = CALCULATE(YourMeasure,FILTER(Table,Table[Year]=2018))
2017 value = CALCULATE(YourMeasure,FILTER(Table,Table[Year]=2017))

 

...

45.png

Best Regards,
Community Support Team _ Eason

Anonymous
Not applicable

Hi @amitchandak ,

 

Thanks for your reply.

Here you mentioned about the sorting of column header but in my scenario, i want to sort the values in each column.

 

example: from the above snap, in 2019 column, the values should be sorted desceneding order like 256748, 67744, 37377 and 0.

 

amitchandak
Super User
Super User

@Anonymous , Create column in date table

 

Year 1= [Year]

Year sort =  rankx('Date', [Year],,desc,dense)

 

Mark Year sort as sort column of year 1 and use  year 1 in visual

 

Same case dicussed here

How to Create Sort Column and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.