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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors