Forum Discussion

BedhiafiAmira's avatar
BedhiafiAmira
Frequent Visitor
3 years ago
Solved

Sort a matrix without adding the column

I have the following Matrix :     My measure is like below :    Total_Sales = SUMX ( FactSales, FactSales[SalesQuantity] * FactSales[UnitPrice] )   and my DimDate contains : CalendarM...
  • PijushRoy's avatar
    3 years ago

    Hi BedhiafiAmira 

    As I saw, your month now sort as per Alphabetic order
    So you need to create a calculated column in your DimDate table, please change DAX as per your month column name

    MONTH_SORT = 
    Switch(
    True(),
    Month = "January",1,
    Month = "February",2,
    Month = "March",3,
    Month = "April",4,
    Month = "May",5,
    Month = "June",6,
    Month = "July",7,
    Month = "August",8,
    Month = "September",9,
    Month = "October",10,
    Month = "November",11,
    Month = "December",12)
    

     I used calendar month scquence, if your year start from June, so you need to put June as 1 

     

    Then click on your MONTH column and select SORT_MONTH column 

     

    Now click on table matrix visual change sory by month column

    If solve your requirement, please mark this answer as SOLUTION
    If this comment helps you, please LIKE this comment/Kudos