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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Evelyn_L
Frequent Visitor

Sort Martix by column

I'm currently using the sort option to organize data, but it's sorting based on the values across all months. Instead, I want to sort data by the selected month specifically. For example, if I select January and sort in descending order, it should display values like 29508, 20484, 17844, 10368, etc. Similarly, if I select February and sort, it should show 29748, 10596, 9684, 9468, etc.

Is there a way to achieve this?

Screenshot 2024-07-08 141150.png

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @Evelyn_L - Use below measure to sort the value dynamically as per selection of month:

 

Here i have a seperate date table connected to my financial table date column , 

 

Measure:

 

SelectedMonthValue =
VAR SelectedMonth = SELECTEDVALUE('DateTable'[Month])
RETURN
    CALCULATE(
        SUM(financials[Profit]),
        FILTER(
            financials,
            FORMAT(financials[Date], "mmmm") = SelectedMonth
        )
    )

 

rajendraongole1_0-1720678669809.png

 

sort the matrix visual with selectdmonthvalue

rajendraongole1_1-1720678857156.png

 

it works. please check

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

1 REPLY 1
rajendraongole1
Super User
Super User

Hi @Evelyn_L - Use below measure to sort the value dynamically as per selection of month:

 

Here i have a seperate date table connected to my financial table date column , 

 

Measure:

 

SelectedMonthValue =
VAR SelectedMonth = SELECTEDVALUE('DateTable'[Month])
RETURN
    CALCULATE(
        SUM(financials[Profit]),
        FILTER(
            financials,
            FORMAT(financials[Date], "mmmm") = SelectedMonth
        )
    )

 

rajendraongole1_0-1720678669809.png

 

sort the matrix visual with selectdmonthvalue

rajendraongole1_1-1720678857156.png

 

it works. please check

 

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!

 

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.