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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
vishakhawali
Frequent Visitor

Get value from a previous row if the next row is Blank

Hi,

 

I have a Matrix, where my KeyDateLookup is a customised Dimension and my ActualsQoQ, ActualsQoQ_minus1 are my measures which calculate the Cumulative sums.


In the below image for row no 17, I would need the value $1812077.0, 
for row no 114, I would need $6105780.8 and so on for the blank rows and similar calculation would be needed for other measures.

 

 

vishakhawali_0-1630383619794.png

 

Can you please help me with this?

 

Thanks

Vishakha

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Please try measure like below:

Measure 2 = var current_ = SELECTEDVALUE('Table'[Key Date Lookup])
return IF(ISBLANK([Measure]),CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Key Date Lookup]=current_-1)),[Measure])

Vlianlmsft_0-1630654777500.png

I created a sample pbix for your reference

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Please try measure like below:

Measure 2 = var current_ = SELECTEDVALUE('Table'[Key Date Lookup])
return IF(ISBLANK([Measure]),CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Key Date Lookup]=current_-1)),[Measure])

Vlianlmsft_0-1630654777500.png

I created a sample pbix for your reference

MFelix
Super User
Super User

Hi @vishakhawali ,

 

Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

If the information is sensitive please share it trough private message.


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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