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! Learn more

Reply
Renef92
Frequent Visitor

Having trouble retrieving the previous value

Hello all, 

 

My goal is to get to the previous value from my price column; based on the date downloaded column. I've added an index and have calculated the previous index using the selected index. 

The problem is that my previous price measure is returning the same value. Any ideas?

Prev Index =

var Ind = SELECTEDVALUE(Sheet1[Index])
var previn = CALCULATE(MAX(Sheet1[Index]), FILTER(ALL(Sheet1), Sheet1[Index] < Ind))

return
previn
 
Previous Price =
var Ind = SELECTEDVALUE(Sheet1[Index])

var previn = CALCULATE(MAX(Sheet1[Index]), FILTER(ALL(Sheet1), Sheet1[Index] < Ind))



return

CALCULATE(SUM(Sheet1[Price]), FILTER(Sheet1, previn)

)

 

Renef92_0-1648775708252.png

 

 

1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you, this worked perfectly. 

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Renef92
Frequent Visitor

I added a more appropriate pic. 

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