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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.