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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Lookup or Join based on partial strings and values in multiple columns

Hi folks. 

 

I can figure no smart way to do this. Sure you guys have brilliant ideas.

 

I have an Action table in which each action has a action name, an action type and an action category. Each field is a string. The value of Action Name can be any string, the value of Action Type is one of a few possible strings, the value of Action Category is one of a few (other) possible strings.This table has about a thousand rows.

 

I have a Tag table which I would like to use to assign one tag to each action. Each row of the Tag table shows criteria that must be met for an action to qualify. The three criteria columns are Action name beginning, Action type, Action category. This table has two dozen rows. Multiple rows can have the same tag value. Any criterion can be null in a given row.

 

Criteria are such that an action will never match more than one Tag row but it could match none, in which case it will be tagged "Other".

 

Of course I could write custom columns in the Action table and hard-code the criteria, but there must be a more fexible approach, right?

 

Many. Thanks

2 ACCEPTED SOLUTIONS
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

>The three criteria columns are Action name beginning, Action type, Action category. This table has two dozen rows. Multiple rows can have the same tag value. Any criterion can be null in a given row.

I'd like to suggest you add a calculated column with if statement and text functions to combine multiple column values to one with conditions.

 

Please share some sample data with expect result to help us clarify your requirement.

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

Anonymous
Not applicable

Thank you. I have finally decide to simply add a calculated column with multiple 'if... then... else... " statements. Not the cleanest way but the simplest to code and reda anyway. Thank you for your suggestion.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

>The three criteria columns are Action name beginning, Action type, Action category. This table has two dozen rows. Multiple rows can have the same tag value. Any criterion can be null in a given row.

I'd like to suggest you add a calculated column with if statement and text functions to combine multiple column values to one with conditions.

 

Please share some sample data with expect result to help us clarify your requirement.

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Thank you. I have finally decide to simply add a calculated column with multiple 'if... then... else... " statements. Not the cleanest way but the simplest to code and reda anyway. Thank you for your suggestion.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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