March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
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.
Solved! Go to Solution.
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.
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.
@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?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
86 | |
84 | |
77 | |
49 |
User | Count |
---|---|
160 | |
144 | |
103 | |
74 | |
57 |