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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I'm trying to create a measure to pull some previous data in a separate row to be able to calculate. For example, I have an athlete that takes a test 5 different times on dates , 1/6/2018, 2/24/2018, 3/18/2018, 4/21/2018, and 5/30/2018. Can I create a measure to compare the test score from 5/30/2018 with only 4/21/2018. And if so would I then be able to create a measure to subtract the difference between the two to see the change between the two scores.
Regards,
Daniel Rivas
HI,@drivas771994
Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?
Best Regards,
Lin
hi,@drivas771994
After my research, you can do do these follow my steps like below:
Step1:
add two measure like this:
last score = var lastda= CALCULATE(MAX(Table2[Date]), FILTER ( ALL ( Table2[Date]), Table2[Date] < MAX ( Table2[Date] ))) return CALCULATE(MAX(Table2[SCORE]),Table2[Date]=lastda)
difference = var lastda= CALCULATE(MAX(Table2[Date]), FILTER ( ALL ( Table2[Date]), Table2[Date] < MAX ( Table2[Date] ))) return var lastsc=CALCULATE(MAX(Table2[SCORE]),Table2[Date]=lastda) return CALCULATE(MAX(Table2[SCORE])-lastsc)
Result:
here is demo,please try it.
Best Regards,
Lin
Hi Lin,
Thank you for your response. Unfortunately, the last score formula is giving me the same score as the day of.
hi,@drivas771994
After my research, I replicate your formula on my own report, it works well. For your error ,It should be there is no relationship between Dates Table and Table1.
for example.
then result:
So, please check these
1. if date column in your visual is from Table1
then use table1 date column in the formula instead of Date Table [Date]
2. and if date column in your visual is from Date Table
then create the relationship between Table1 and Date Table, and cross filter direction is Both
If it is not your case, please share your demo pbix for us. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading
Best Regards,
Lin
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!