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

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.

Reply
Anonymous
Not applicable

How to return a previous row within a report view

Hello Community, 

I will appreciate contribution to this challenge I have been trying to figure how the return the previous row in my use cases in a Matrix view in the snipnet 2 shown below.   I created a calculated column to return previous row in the table below (Previous Cost), But when I try to reuse the column  in a Matrix view the previous row columns do not align with the cost column any longer see snipnet 2.

Screen Shot 2021-04-29 at 4.37.30 PM.png

 

Screen Shot 2021-04-29 at 4.35.36 PM.png

 

Thanks for your help 

Samson.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hey Greg , 

Thanks for the input , this is the current outcome, Things still not aligning but a big step.

 

Capture.PNG

Thank you,

Samson Eromonsei

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Anonymous Seems like it would be something along the lines of:

Previous Cost (Measure) =
  VAR __CodeID = MAX('Table'[CodeID])
  VAR __Date = MAX('Table'[Date])
  VAR __Table = FILTER(ALL('Table'),'Table'[CodeID] = __CodeID && 'Table'[Date]<__Date)
  VAR __Previous = MAXX(__Table,[Date])
RETURN
  MAXX(FILTER(__Table,[Date] = __Previous),[Cost])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hey Greg , 

Thanks for the input , this is the current outcome, Things still not aligning but a big step.

 

Capture.PNG

Thank you,

Samson Eromonsei

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.