Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 nos. are in squence.
So what is expecting in output column, till Termination Point above quesions in one Group like group1,group2 ,.....
groups sequence should be depend on sequence no.
Please refer above image .
Thanks ,
PD
Solved! Go to Solution.
Hi @Pooja9 ,
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 _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Pooja9 ,
According to your description, here's my solution, create a calculated column.
Column =
" Group "
& RANKX (
'Table',
MINX (
FILTER (
'Table',
'Table'[Sequence No] >= EARLIER ( 'Table'[Sequence No] )
&& 'Table'[Short_Label] = "Termination point"
),
'Table'[Sequence No]
),
,
ASC,
DENSE
)
Get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yanjiang-msft ,
Thanks for suggestion ...
but now data has been updated have to consider "Pre Code" as well same scenario but if perception code change group should start like G1,G2,G3 again ..... because sequence no start with 100 with every new Pre code.
Thanks ,
PD
Hi @Pooja9 ,
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 _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Pooja9 , 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)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |