Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Greetings, i am trying to formulate a DAX formula for my powerbi report via Transform Data (PowerQuery) than mimics or reproduces a LOOKUP/SEARCH formula i have in Excel: =IF([@[VENDOR_NAME]]=0,IFERROR(LOOKUP(4000,SEARCH(Output!$E$4:$E$717,AM314437),Output!$C$4:$C$717),""),[@[VENDOR_NAME]])
The formula above bascially searches for a vendor in a field called "Vendor Name", and returns the vendor name should one exist. However, when a vendor is not found in the vendor name then it will seach for a vendor name in another field labled "Journal Entry Line Description', and if it finds a vendor name that matches the vendor name in a table then it returns the appropriate vendor name. I am looking to create a formula that mimics the one above utilizing DAX. Not sure if that can be done but if more information is required i would be happy to send it.
Solved! Go to Solution.
Hi @Ahollis ,
Assume that you have the table 'Vendors' which include the field [VENDOR_NAME] and 'Output', you can create a calculated column as below in the table 'Vendors':
New_VendorName =
IF (
ISBLANK ( 'Vendors'[VENDOR_NAME] ),
MAXX (
FILTER (
Output,
SEARCH ( Output[ColumnE], 'Vendors'[Journal Entry Line Description], 1, 0 ) > 0
),
Output[ColumnE]
),
[VENDOR_NAME]
)
Best Regards
Hi @Ahollis ,
Assume that you have the table 'Vendors' which include the field [VENDOR_NAME] and 'Output', you can create a calculated column as below in the table 'Vendors':
New_VendorName =
IF (
ISBLANK ( 'Vendors'[VENDOR_NAME] ),
MAXX (
FILTER (
Output,
SEARCH ( Output[ColumnE], 'Vendors'[Journal Entry Line Description], 1, 0 ) > 0
),
Output[ColumnE]
),
[VENDOR_NAME]
)
Best Regards
in Power BI DAX you use COALESCE( .. ) for this.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 61 | |
| 47 | |
| 39 | |
| 23 | |
| 23 |
| User | Count |
|---|---|
| 144 | |
| 106 | |
| 63 | |
| 38 | |
| 31 |