Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I am to make a comparison of each row of an id to the next to check if the consecutive results are the same?
How can I do that? Thanks in advance.
Solved! Go to Solution.
Hello @aanchalshah18 ,
See if this blog helps you
Best regards
Harsh Nathani
Have I answered your question? Mark my position as a solution! Appreciate with a Kudos!! (Click the Thumbs button above)
@aanchalshah18
Please check the sample, you can crate the column to check whether it repeats with last role, but you need a column of index or date or something else as the filter.
Column = IF([Result]=CALCULATE(MAX([Result]),FILTER('Table',[Index]=EARLIER('Table'[Index])-1)),1,0)
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for this..
In terms of me wanting to compare
Id Missed/Not
1 Missed
1 Missed
1
1
So what I want to do is, take a percentage of missed ie. 2/4 = 50%
How can I do that?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@aanchalshah18 , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
You can refer how deal with this day vs last as column vs measure in this blog
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
HI @aanchalshah18 ,
Create a column
Previous Value =
VAR _previousvalue =
MAXX (
FILTER (
Table,
Table[id]
< EARLIER ( Table[id] )
),
Table[Value]
)
RETURN
IF (
Table[Value] = _previousvalue,
1,
0
)
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hi Thanks Harsh,
What would table[value] mean here?
Hi @aanchalshah18 ,
Table[Value] is the Value you want to compare.
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Hello @aanchalshah18 ,
See if this blog helps you
Best regards
Harsh Nathani
Have I answered your question? Mark my position as a solution! Appreciate with a Kudos!! (Click the Thumbs button above)