The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
i have the following situation:
Table A:
ID | Description | Category (measured row with DAX) |
01 | this is a audi car | |
02 | yellow mercedes | |
03 | an red apple |
Table B:
Keywords | Category |
audi | Car |
mercedes | Car |
apple | Fruit |
Know I want to do the following:
Read each data in Table A[Description] and look for certain strings and compare it with the values in Table B[Keywords].
If the description contains a word from Keywords, insert the value in Table B[Category] to Table A[Category]
Expected result:
Table A:
ID | Description | Category (measured row) |
01 | this is a audi car | Car |
02 | yellow mercedes | Car |
03 | an red apple | Fruit |
Can someone help me?
Thanks!
Best
Solved! Go to Solution.
Hi @furg42 ,
Have a look at the attached pbix. It doesn't necessarily address your use case but can help you get started.
Hi,
This calculated column formula in Table A works.
Hope this helps.
Category = FIRSTNONBLANK(FILTER(VALUES('Table B'[Keywords]),SEARCH('Table B'[Keywords],'Table A'[Description],1,0)),1)
Hi,
This calculated column formula in Table A works.
Hope this helps.
Category = FIRSTNONBLANK(FILTER(VALUES('Table B'[Keywords]),SEARCH('Table B'[Keywords],'Table A'[Description],1,0)),1)
Hi @furg42 ,
Have a look at the attached pbix. It doesn't necessarily address your use case but can help you get started.