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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I am building an app to analyse my bank transactions. These transactions have two columns that contain more or less information stored in an unstructured manner. My plan is to use reference tables (that I already have loaded into the model) to extract and structure data from these two columns. I have for example tables with places, country codes, and company names.
I have solved this problem with DAX formula's.
First I look into the reference table to find data using the following formula:
MAXX(FILTER(Country, SEARCH(" " & Country[Country code], Transaction[Description],,0)>0),Country[Country code])
Then I will calculate a new column which removes the country code, and then I will use this column to search for the next one.
My problem:
My approach convolutes the model with data I only use for ETL purpoces. Therefore I would like to solve this problem in Power Query.
Question:
How do I solve this problem in Power Query?
Hi @Anonymous ,
Has your problem been solved? If it is solved, please mark a reply which is helpful to you.
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
Hi @Anonymous ,
Are you trying to implement the logic of the above DAX in PQ? If so, please try the following custom column.
=
let
CurrentDec = [Description],
SelectRows = Table.SelectRows(Country, each Text.Contains(CurrentDec, " " & [Country code], Comparer.OrdinalIgnoreCase))[Country code]
in
List.Max(SelectRows)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 7 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 22 | |
| 14 | |
| 11 | |
| 10 | |
| 9 |