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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
ritanoori
Resolver I
Resolver I

First non blank does not work

Hey everyone

I'm trying to use first non blank in DAX. The value I'm trying to use is available in the other refresnced table but it's not working. 

Almost tried everything. 

Why is it not working for this case!! 

 

 

First I tried this DAX first, trying to get the shipment number from FACT_TMS table 

SHIPMENT_NUMBER2 =
CALCULATE (
FIRSTNONBLANK ( Fact_TMS_reports[SHIPMENT_NUMBER], 1 ),
FILTER ( ALL( Fact_TMS_reports ), Fact_TMS_reports[VOUCHER_ID] = Fact_GL[New PONumber ] )
)
 
then thought it might because there is more than one line for this PO, so I created different table that has unique value but it is still not working. 
 
SHIPMENT_NUMBER3 =
CALCULATE (
FIRSTNONBLANK ( Ref_TMS_Reports[SHIPMENT_NUMBER], true() ),
FILTER ( ALL( Ref_TMS_Reports ), Ref_TMS_Reports[Correct Voucher ID] = Fact_GL[New PONumber ] )
)

 

Both are giving blank. 

Here below you can find the excel sample.

https://drive.google.com/file/d/1oAWUXGwd8KyoG_kzvFDsO9wE2KbGrrAh/view?usp=sharing

Appreciate your help. firstnonblankfirstnonblank 

Thanks

Rita

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ritanoori , if this is a new column this should work

minx(filter(Ref_TMS_Reports, Ref_TMS_Reports[Correct Voucher ID] = Fact_GL[New PONumber ]),Ref_TMS_Reports[SHIPMENT_NUMBER])

 

 

or

 

minx(filter(Ref_TMS_Reports, Ref_TMS_Reports[Correct Voucher ID] = Fact_GL[New PONumber ] && not(isblank(Ref_TMS_Reports[SHIPMENT_NUMBER])) ),Ref_TMS_Reports[SHIPMENT_NUMBER])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@ritanoori , if this is a new column this should work

minx(filter(Ref_TMS_Reports, Ref_TMS_Reports[Correct Voucher ID] = Fact_GL[New PONumber ]),Ref_TMS_Reports[SHIPMENT_NUMBER])

 

 

or

 

minx(filter(Ref_TMS_Reports, Ref_TMS_Reports[Correct Voucher ID] = Fact_GL[New PONumber ] && not(isblank(Ref_TMS_Reports[SHIPMENT_NUMBER])) ),Ref_TMS_Reports[SHIPMENT_NUMBER])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

So glad I found this, thank you!!

 

FIRSTNONBLANK was returing values for certain Lookup cells but not the others...

@amitchandak 

Thank you so much 🙂 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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