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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
thathavenkat
New Member

please help me to get non blank value from a column data.

Please help me to get non blank value in Power Bi.

Example: data has historical in table. But always showing the latest data. one of the column has the empty value in that case.. if there is an empty for the latest data then need to check the previous non-empty value from the data and dispaly.

 

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @thathavenkat ,

You can try to create a measure as below:

Measure = 
var _curdate=MAX('Test'[Date])
var _nonValueDate=CALCULATE(MAX('Test'[Date]),FILTER(ALL('Test'),'Test'[Date]<=_curdate&&NOT(ISBLANK('Test'[Qty]))))
return CALCULATE(MAX('Test'[Qty]),FILTER(ALL('Test'),'Test'[Date]=_nonValueDate))

with non blank value.JPG

In addition, you can review the solutions in the following threads and check if they can help you:

Return latest value present in power BI

Fill in blanks with last non blank value

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @thathavenkat ,

You can try to create a measure as below:

Measure = 
var _curdate=MAX('Test'[Date])
var _nonValueDate=CALCULATE(MAX('Test'[Date]),FILTER(ALL('Test'),'Test'[Date]<=_curdate&&NOT(ISBLANK('Test'[Qty]))))
return CALCULATE(MAX('Test'[Qty]),FILTER(ALL('Test'),'Test'[Date]=_nonValueDate))

with non blank value.JPG

In addition, you can review the solutions in the following threads and check if they can help you:

Return latest value present in power BI

Fill in blanks with last non blank value

Best Regards

Rena

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
ryan_mayu
Super User
Super User

@thathavenkat 

maybe you can try lastnonblank

https://docs.microsoft.com/en-us/dax/lastnonblank-function-dax

 





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

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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