Forum Discussion
anandav
7 years agoSkilled Sharer
Sorting by multiple columns
Hi Experts, I have the following data. Employee Training Date Greg Training 1 19/09/2017 Bill Training 1 19/09/2017 Joe Training 1 19/09/2017 David Training 1 19/09/2017 ...
- 7 years ago
You may try using ISONORAFTER Function to add a measure.
Measure = VAR t = SUMMARIZE ( ALLSELECTED ( Table1 ), Table1[Employee], Table1[Training], Table1[Date] ) RETURN COUNTROWS ( FILTER ( t, ISONORAFTER ( Table1[Employee], SELECTEDVALUE ( Table1[Employee] ), DESC, Table1[Training], SELECTEDVALUE ( Table1[Training] ), ASC, Table1[Date], SELECTEDVALUE ( Table1[Date] ), DESC ) ) )
v-chuncz-msft
7 years agoCommunity Support
You may try using ISONORAFTER Function to add a measure.
Measure =
VAR t =
SUMMARIZE (
ALLSELECTED ( Table1 ),
Table1[Employee],
Table1[Training],
Table1[Date]
)
RETURN
COUNTROWS (
FILTER (
t,
ISONORAFTER (
Table1[Employee], SELECTEDVALUE ( Table1[Employee] ), DESC,
Table1[Training], SELECTEDVALUE ( Table1[Training] ), ASC,
Table1[Date], SELECTEDVALUE ( Table1[Date] ), DESC
)
)
)
usman2338
7 years agoFrequent Visitor
Would appreciate if you could explain what is going on in the code. I've used this and it gives me the correct sorting behaviour but i don't understand the workings of the code. Thanks