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
Anonymous
Not applicable

How to dynamically compare values for different records in Power BI?

Hi all, 

 

Hope everyone is safe and sound.

 

I have a list of records  which value is periodically measured and I need to calculate how much that value has changed for each record after the latest evaluation - to show in percentages whether the value has increased or decreased.

 

Could someone please advice what would be the correct way to accomplish this? Would sincerely appreciate any advice. 

mantastg_1-1623979934465.png

1 ACCEPTED SOLUTION

@Anonymous 

update the pbix file. you can create either a column or a measure for that

please see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

5 REPLIES 5
ryan_mayu
Super User
Super User

@Anonymous 

is this what you want?

Measure 2 = 
var last=maxx(FILTER(all('Table'),'Table'[record]=max('Table'[record])&&'Table'[Date]<max('Table'[Date])),'Table'[Date])
var lastvalue=CALCULATE([Measure],FILTER(all('Table'),'Table'[record]=MAX('Table'[record])&&'Table'[Date]=last))
return DIVIDE([Measure]-lastvalue,lastvalue)

1.PNG

please see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hi, @ryan_mayu . Many thanks for this. I am trying to reproduce it on my end.  Still find a bit difficult.

 

May I ask, why does record has value 15 twice on same date (2021-06-18) instead of 30? I am not able to modify my original data set to make it as your example.

mantastg_0-1623985782953.png

Therefore, I am not able to add the measure to the table the same way you did. 

mantastg_1-1623986074535.png

 

 

@Anonymous 

update the pbix file. you can create either a column or a measure for that

please see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Thank you very much for this!

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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