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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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