Hi All,
I have list of stop words , i need help to clean the text and remove stop words from a column from another table using the stop words list
test.pbix (29.4 KB)
Hi All,
I have list of stop words , i need help to clean the text and remove stop words from a column from another table using the stop words list
test.pbix (29.4 KB)
Please clarify your test example - which of these are the stop words?
and am I correct in assuming the other represents the area the stop words need to be removed from?
Is this the format your working data will be in?
Hi @Heather - the U column is the list of stop words that I have got from internet.
We need to remove these stop words if present in the fact table column. So ur 2nd point of understanding is correct and yes ur 3rd point of understanding also correct. My actual data has one column called as TExt which has sentences from which stop words needs to be removed.
Thank you for the clarification - please see the attached, I duplicated your tables so I could rename and you could see what I was doing with them.
The solution is in the tabled titled “eDNA Fact”, and in the table code I added a reference to the post from Imke Feldman where I grabbed the original logic.
let
Source = "Hi i am a bad boy the is thanks to match",
#"Converted to Table" = #table(1, {{Source}}),
#"Replacement Function" =
let
//custom function thanks to Imke Feldmann
//https://www.thebiccountant.com/2016/05/22/multiple-replacements-in-power-bi-and-power-query/
Source1 = ReplacementsTable,
CreateListOfLists = Table.AddColumn(Source1, "List", each ({[U], [B]})),
Text = #"Converted to Table",
TurnTextToList = Table.AddColumn(Text, "Custom", each Text.Split([Column1], " ")),
Replacements = Table.AddColumn(TurnTextToList, "Changed Text Expected",
each Text.Combine(List.ReplaceMatchingItems([Custom],CreateListOfLists[List])," ")),
Cleanup = Table.RemoveColumns(Replacements,{"Custom"})
in
Cleanup
in
#"Replacement Function"
eDNA Solution - StopWords.pbix (32.4 KB)
Working perfectly fine thanks
glad I could help