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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ritanoori
Resolver I
Resolver I

MINX return blank

Hi All

 

I have created a new coulmn in DAX.. using below- Some of the results are blank and I want to replace with another column value from same table. i.e: Shipment Number. What can I add to the DAX so if the look up value result is blank to return Shipement number instead. 

 

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

 

ritanoori_0-1625826141167.png

 

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Is there a relationship between the two tables?If yes, try something like below.

PO NUMBER =
VAR MINX_ = minx(filter(Fact_GL, Fact_GL[New PONumber ] =Ref_TMS_Reports[Correct Voucher ID] && not(isblank(Fact_GL[New PONumber ])) ),Fact_GL[New PONumber ])
RETURN IF(ISBLANK(MINX_),FIRSTNOBLANKVALUE(Fact_GL[XXX],1),MINX_)

 

If the problem still exists, please share the sample data to let me know more about your data model.

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Is there a relationship between the two tables?If yes, try something like below.

PO NUMBER =
VAR MINX_ = minx(filter(Fact_GL, Fact_GL[New PONumber ] =Ref_TMS_Reports[Correct Voucher ID] && not(isblank(Fact_GL[New PONumber ])) ),Fact_GL[New PONumber ])
RETURN IF(ISBLANK(MINX_),FIRSTNOBLANKVALUE(Fact_GL[XXX],1),MINX_)

 

If the problem still exists, please share the sample data to let me know more about your data model.

amitchandak
Super User
Super User

@ritanoori , the code seems fine. Check is blank or empty string

PO NUMBER = minx(filter(Fact_GL, Fact_GL[New PONumber ] =Ref_TMS_Reports[Correct Voucher ID] && not(isblank(Fact_GL[New PONumber ])) && Fact_GL[New PONumber ] <> "" ),Fact_GL[New PONumber ])

 

Also is there a matching record in second table ?

 

Can you share sample data and sample output in table format?

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.