Forum Discussion
jcastr02
Post Prodigy
4 years agoDescending Order for Date in Matrix
I have a matrix visual where I have the date in the columns. Is there a way I can sort descending so I have the most recent dates on the left vs. having to scroll (July should show on left first but...
- 4 years ago
Hi jcastr02 ,
Adjust to the below and sort by rank2:
RANK = var q1=FORMAT('Table'[Date],"YYYYMM") var q2=FORMAT(TODAY(),"YYYYMM") var value1=q1-q2 return value1rank2 = var q1=FORMAT('Table'[Date],"YYYYMM") var q2=FORMAT(TODAY(),"YYYYMM") return if(q1-q2<0,ABS(q1-q2)+MAXX('Table','Table'[RANK]),q1-q2)Or rank 2 use the below :
rank2 = var q1=FORMAT('Table'[Date],"YYYYMM") var q2=FORMAT(TODAY(),"YYYYMM") return if(q1-q2<0,MAXX('Table','Table'[RANK])+ABS(MINX('Table','Table'[RANK]))+(q1-q2),q1-q2)Output:
Did I answer your question? Mark my post as a solution!
Best RegardsLucien
Materous
2 years agoNew Member
Replying to this despite it's age b/c it was the first search result when I searched for how to sort matrix date column descending.
The way I resolved this is just to put the date field as a value then sorting off that via the three dots (...).
1. select the elipsis (...)
2. sort by date field (it will probably be summarized by earliest, this worked for me if it doesnt for you I'd play around with it or remove the summarization)
3. sort descending
4. go to Format Visual
5. specific column
6. white out the font for that value, total included if need be.
Hope this helps