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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Cleaning a column of non-key words

Hi guys

 

Not sure this is one for Power BI really, I can use SQL also if this is better, but anyway here is my challenge:

 

I have a column containing medical conditions. I have a fabulous word cloud which shows the most commonly occuring medical conditions people have claimed for. 

The issue with the medical condition column, is it has all sorts of words which are not key, for example AND IN ON OR LEFT RIGHT UNCLASSIFIED THE etc... the list goes on.

I have a terribly long conditional column called 'Condition Summary' which has half cleaned the condition column, and i've done some replacing to remove conjunctions but it's still not great and my query is very long as a result.

 

Does anyone have an idea on how I can clean this a little more efficiently? 

 

Jemma

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try if this works: http://www.thebiccountant.com/2016/05/22/multiple-replacements-in-power-bi-and-power-query/ & report back.

Just leave the column "ReplaceWith" blank.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Stachu
Community Champion
Community Champion

The conditional column is in DAX, correct? If so then it should be more performant (and more likely easier to do) in the query editor (M), you could use something like 
https://docs.microsoft.com/en-us/powerquery-m/text-replace

checking for the list of the irrelevant words 

Can you add sample tables (in format that can be copied to PowerBI) from your model with anonymised data? Like this (just copy and paste into the post window).

Column1 Column2
A 1
B 2.5

 



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.