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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.