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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.