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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors