Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
IHam
Helper III
Helper III

Difference in last two consecutive values

I have a series of reports (in report time order) that are graded in a variety of categories for an identifier. What I need to do is to identify (using the code) those with consecutive 5 grades (this is the lowest grade) in any category. It is only required to identify those who have scored a 5 in any of the latest set of reports (the highest report time order) and scored a 5 in any of the previous set of reports. Once this is done, they will be highlighted on a table. The report time is dynamic so will be a value 4 at the next set of reports etc.

I have tried a few ways of doing this but it isn't returning the correct value.

Can anyone help?

 

 

PBI.png

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@IHam,

 

You may try using LOOKUPVALUE and CONTAINS to add calculated column.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@IHam,

 

You may try using LOOKUPVALUE and CONTAINS to add calculated column.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks - I will have a look at those today. One of the issues I had been having was that one person had many entries for the same time and if any of those were a 5, it would want the code to register it as a 5.

thanks for getting back to me.

I figured it out using Vars. many thanks for your help

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.