Forum Discussion

Evelyn_L's avatar
Evelyn_L
Frequent Visitor
2 years ago
Solved

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...
  • rajendraongole1's avatar
    2 years ago

    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
            )
        )

     

     

    sort the matrix visual with selectdmonthvalue

     

    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!!