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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Tyron
Frequent Visitor

Comparing rows in same table to verify what value has changed

Hi

I have researched for an answer to this problem but yet to find the right answer.

 

I have a dataset with columns, ID, Date, Development Type, Delivery Term and would like to see what data has change from one week to the next (if Delivery Term has changed to be specific). All data is within a single table.

 

I need to be able to show (using conditional formatting, this part I am okay with) rows in a table that have been updated.

 

Sample Data (visually you can see PRJ003 has had Delivery Term changed, how is the comparison made?)

IDDateDevelopment TypeDelivery Term
PRJ0013/03/2021NewTerm 1
PRJ0023/03/2021ImprovementTerm 2
PRJ0033/03/2021ImprovementTerm 2
PRJ0043/03/2021ImprovementTerm 3
PRJ0053/03/2021NewTerm 4
PRJ0063/03/2021NewTerm 4
PRJ00110/03/2021NewTerm 1
PRJ00210/03/2021ImprovementTerm 2
PRJ00310/03/2021ImprovementTerm 3
PRJ00410/03/2021ImprovementTerm 3
PRJ00510/03/2021NewTerm 4
PRJ00610/03/2021NewTerm 4

 

Thanks and appreciate the assistance

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

This will give you a column of the previous value:

DiffFromPrvWeek = VAR _id = TablePrj[ID]
VAR _term = TablePrj[Delivery Term]
VAR _date = TablePrj[Date]
RETURN
CALCULATE(MIN(TablePrj[Delivery Term]), FILTER(ALL(TablePrj),  TablePrj[ID] = _id && TablePrj[Date] = _date -7))

You can use it to create another column to signal a difference (from delivery term) or use an IF statement within the formula.

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hello how about I need to compare recipes from the same table, by different scepters, and material to see if they match by the amount loaded in the components:

arielgerman195_0-1674313551147.png

and put in a column if it matches or not.

HotChilli
Super User
Super User

This will give you a column of the previous value:

DiffFromPrvWeek = VAR _id = TablePrj[ID]
VAR _term = TablePrj[Delivery Term]
VAR _date = TablePrj[Date]
RETURN
CALCULATE(MIN(TablePrj[Delivery Term]), FILTER(ALL(TablePrj),  TablePrj[ID] = _id && TablePrj[Date] = _date -7))

You can use it to create another column to signal a difference (from delivery term) or use an IF statement within the formula.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors