Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello, I have a matrix in the rows, I have the names of the stations, in the columns I have the dates and in the values I have the quantity that is sold for each day. I would like to be able to order from highest to lowest on any date that I can sort by rows and by total quantity, but not by columns, they know how to do it.
Solved! Go to Solution.
Hi @Anonymous ,
If the date column is from your data table, you could create a custom column in Power Query, like below.
= Date.Year([Date])*10000
+ (12-Date.Month([Date]))*100
+ 31-Date.Day([Date])
If the date column is from the calendar table that you create with DAX, you could try like this:
Date =
VAR vCalendar =
CALENDAR ( MIN ( 'Table_Calendar'[Date] ), MAX ( 'Table_Calendar'[Date] ) )
RETURN
ADDCOLUMNS (
vCalendar,
"Index", YEAR ( [Date] )*10000
+ (12 - MONTH ( [Date] ))*100
+ 31 - DAY ( [Date] )
)
After creating the new column, select the date column and sort by the new one.
For more details, please see the attachment.
Create a desc rank and make it as sort for date and try
New Date = date
Rank =Rankx(all(date),Date[date],,desc,desnse)
Thanks amitchandak is what you need is to order only a date column for example if I want to order by date from highest to lowest by the quantity values for example sort the date 2020-01-02 by the quantity from highest to lowest. can this?
Hi @Anonymous ,
If the date column is from your data table, you could create a custom column in Power Query, like below.
= Date.Year([Date])*10000
+ (12-Date.Month([Date]))*100
+ 31-Date.Day([Date])
If the date column is from the calendar table that you create with DAX, you could try like this:
Date =
VAR vCalendar =
CALENDAR ( MIN ( 'Table_Calendar'[Date] ), MAX ( 'Table_Calendar'[Date] ) )
RETURN
ADDCOLUMNS (
vCalendar,
"Index", YEAR ( [Date] )*10000
+ (12 - MONTH ( [Date] ))*100
+ 31 - DAY ( [Date] )
)
After creating the new column, select the date column and sort by the new one.
For more details, please see the attachment.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
84 | |
83 | |
64 | |
61 | |
55 |
User | Count |
---|---|
179 | |
108 | |
105 | |
71 | |
70 |