Forum Discussion
Anonymous
3 years agoNot applicable
Row wise grouping using DAX
Hi All, Have data set like above image and am struggling for grouping of data, row wise. using DAX or MDAX. Like in above image "short_lable" column having "Tremination point" and sequence ...
- 3 years ago
Hi Anonymous ,
Sorry for late back. Modify the formula to:
Column = " Group " & RANKX ( FILTER ( 'Table', 'Table'[pre code] = EARLIER ( 'Table'[pre code] ) ), MINX ( FILTER ( 'Table', 'Table'[Sequence No] >= EARLIER ( 'Table'[Sequence No] ) && 'Table'[Short_Label] = "Termination point" && 'Table'[pre code] = EARLIER ( 'Table'[pre code] ) ), 'Table'[Sequence No] ), , ASC, DENSE )Get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyjIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
3 years agoSuper User
Anonymous , Create the column
new seq = maxx(filter(Table, Table[squence] >= earlier([sequence]) && [short_label] ="Tremination point" ), [sequence] )
Group = " Group " & Rankx(filter(Table, [new seq] = earlier([new seq])) , [sequence],,asc,dense)