Forum Discussion

Puvvula12's avatar
Puvvula12
Frequent Visitor
3 years ago

Marix Visual - Sorting by desc order

I have a requirement where I am using Matrix visual, I have to show column total on left side and most recent date on left (Descending order). Is there is way to achieve this? 

Data: 

IDAccount NameCity StateSalesInvoice date
1ATX 1001/24/2023
 

2

BPA 2002/25/2023
3COK 3001/24/2023
4cOK 5002/25/2023
5BPA 7003/26/2023
6ATX 2002/25/2023

 Expected table : 

IDAccount NameCity StateTotal SalesMarFebJan
1ATX 300100200 
 

2

BPA 900200 700
3COK 800300500 

 

4 Replies

  • Hello,

     

    Have you tried to make a measure using filter by month? I think you can use these measures:

    Sum Sales Jan = CALCULATE(Sum('Table'[Sales]), MONTH('Table'[Invoice date])=1)
    Sum Sales Fev = CALCULATE(Sum('Table'[Sales]), MONTH('Table'[Invoice date])=2)
    Sum Sales Mar = CALCULATE(Sum('Table'[Sales]), MONTH('Table'[Invoice date])=3)

     But I think your expected table gives wrong numbers, check it. I guess you should expect this:

    • Puvvula12's avatar
      Puvvula12
      Frequent Visitor

      Thank you for your quick response.

      Sorry for not mentioning it earlier, I have to show daily, weekly and Monthly report separately.  How can I show daily sales (365 days) in descending order (most recent date in left to right)?