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.
Hello community,
I'm stuck on a "simple" problem: In a table, I want to flag rows containing some words comming from a list.
Exemple:
DataTable
Id - Phrase - Flag (Subject of this topic)
1 - I am old - true
2 - I am young - false
3 - I am tall - false
4 - I am tiny - true
...
WordList
blue; big; young; sport; tiny...
Because I have a lot of words in my wordlist, I had created a dedicated table WordList with 1 column containing all words on each rows.
I tryed to use a calculated column in my dataTable but impossible to find the right formula.
Can anyone help me please?
Thank you.
Fabien
Solved! Go to Solution.
Hi @Anonymous ,
here is the solution I propose: create a calculated column in the phrases table with the following formula
Flag = SUMX('Wordlist', IF(ISERROR(SEARCH([Words], 'Phrases'[Phrases])),0,1) )
For each phrase, the formula checks the wordlist and puts 1 if it finds the word and 0 otherwise.
Hope this is what you are looking for!
Regards,
LC
Interested in Power BI dashboards? Check out my blog at www.finance-bi.com
Hi @Anonymous ,
here is the solution I propose: create a calculated column in the phrases table with the following formula
Flag = SUMX('Wordlist', IF(ISERROR(SEARCH([Words], 'Phrases'[Phrases])),0,1) )
For each phrase, the formula checks the wordlist and puts 1 if it finds the word and 0 otherwise.
Hope this is what you are looking for!
Regards,
LC
Interested in Power BI dashboards? Check out my blog at www.finance-bi.com
Thank you very much @lc_finance, it's working perfectly!
I was close but I miss some experience with Power BI 🙂
Have a nice day.
Fabien
Very good to hear that it's working for you!
LC
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |