Forum Discussion
Darko_Giac
Helper II
8 years agoModified DAX Formula for Categorizing based on Date of Test Completion
Hi all, I'm looking for a slight modification to a question I had earlier which I can't quite get to work. I'm looking to create a calculated columns using DAX that will categorize student...
- 8 years ago
Hi Darko_Giac
My apologies for late reply
After creating above column, you can create another column as follows to get GROUPINGS.
Please see the Power Pivot Model in attached Excel File
Group = "Group " & RANKX ( Table1, [Notes],, DESC, DENSE )
Zubair_Muhammad
Community Champion
8 years ago
Try this calculated Column
Notes =
VAR FirstClass =
MINX (
TOPN (
1,
FILTER ( Table1, [ParticipantID] = EARLIER ( [ParticipantID] ) ),
[Assessment_end_date_time], ASC
),
[Class]
)
VAR SecondClass =
MINX (
TOPN (
1,
FILTER (
Table1,
[ParticipantID] = EARLIER ( [ParticipantID] )
&& [Class] <> FirstClass
),
[Assessment_end_date_time], ASC
),
[Class]
)
RETURN
"Completed " & SecondClass
& " after "
& FirstClass
Darko_Giac
Helper II
8 years agoThanks for this!
How would I modify the syntax to categorize by groups instead of "Completed X after X".
For example, is there a way to change the label to "Group 1" for those that completed Q after V, "Group 2" for those that completed "NV after V", etc...
Thank you!
D.
- Zubair_Muhammad8 years ago
Community Champion
Hi Darko_Giac
My apologies for late reply
After creating above column, you can create another column as follows to get GROUPINGS.
Please see the Power Pivot Model in attached Excel File
Group = "Group " & RANKX ( Table1, [Notes],, DESC, DENSE )
- Darko_Giac8 years ago
Helper II
Perfect, thank you!