Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
hi,
i need help to extract specific word/text from a string of characters - like text/word example 'wifi' or 'wi-fi' or 'AP' etc and generate a new table with only rows with that contain specific text/word from a specific column cell.
lets say i have a existing power BI table with 100+ rows and 8 columns. in some rows has this type of text/word in column number-4.
I need to generate a new table with rows contains that informations (rows contain that text/word) & discard rest of rows. How?
Solved! Go to Solution.
@roniedhaka , try this
New Table = FILTER('Table',
CONTAINSSTRING('Table'[fruits],"Mango") ||
CONTAINSSTRING('Table'[fruits],"lichie") ||
CONTAINSSTRING('Table'[fruits],"lichee"))
this should work,
New Table = FILTER(
'Table',
(CONTAINSSTRING('Table'[fruits], "Mango") ||
CONTAINSSTRING('Table'[fruits], "lichie") ||
CONTAINSSTRING('Table'[fruits], "lichee")) &&
('Table'[year] = 2023 || 'Table'[year] = 2021)
)
Can you provide atleat 5-10 rows of sample data?
country-id | account-id | fruits | weight /kg | price total kusd | year |
1234 | abcd123 | mango | 4321 | 15 | 2021 |
5678 | efgh456 | lichee | 1234 | 18 | 2022 |
3456 | ijkl789 | dates_mango_orange | 2468 | 22 | 2024 |
6789 | mnop246 | Mango-steen | 1357 | 21 | 2021 |
here is an example table.
i need to transform this table into a new table but limited rows which fruits column contains the word 'mango' or 'Mango' or 'Mango-steen' (appearently 3 rows as per above table, and rest rows discarded).
try this
New Table = FILTER('Table',CONTAINSSTRING('Table'[fruits],"Mango"))
thanks, sorry i ahve to add few more rows to explain a little more.
what i can do if also keep mango and lichee and lichi?
country-id | account-id | fruits | weight /kg | price total kusd | year |
1234 | abcd123 | mango | 4321 | 15 | 2021 |
5678 | efgh456 | lichee | 1234 | 18 | 2022 |
3456 | ijkl789 | dates_mango_orange | 2468 | 22 | 2024 |
6789 | mnop246 | Mango-steen | 1357 | 21 | 2021 |
2468 | wxyz024 | mangosteen & apple | 1234 | 20 | 2020 |
1357 | qrst135 | jackfruit | 5678 | 19 | 2024 |
5432 | uvwx345 | lichie | 3456 | 22 | 2023 |
@roniedhaka , try this
New Table = FILTER('Table',
CONTAINSSTRING('Table'[fruits],"Mango") ||
CONTAINSSTRING('Table'[fruits],"lichie") ||
CONTAINSSTRING('Table'[fruits],"lichee"))
many thanks, this should be it.
one more thing - if i want year 2021 & 2023 rows only, with those specific word/text?
this should work,
New Table = FILTER(
'Table',
(CONTAINSSTRING('Table'[fruits], "Mango") ||
CONTAINSSTRING('Table'[fruits], "lichie") ||
CONTAINSSTRING('Table'[fruits], "lichee")) &&
('Table'[year] = 2023 || 'Table'[year] = 2021)
)
hi, thanks. that solved my problem 80%. But still i have some issues. Let me give the details of it.
the word/text i choose like mango, it is easy to extract. But in real problem i have to extraxt a specific word/text which sometimes appears inside within a big text/word and that unwanted row is chosen.
example - i like to extract word 'AX' & 'wifi' & 'wi-fi' only. Sometimes AX is in mix with other letters formed new word like 'Max', 'Tax', 'dax' etc. Means ax is inside of these words and those rows are unwanted.
i want -
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
58 | |
56 | |
38 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
39 |