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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Removing few characters from rows

I have a column that contains versions of phones. It contains the following rows:

ios 8.3 (0.03K)

IOS 9.3.1 (1.49 k)

IOS 10.1

Android 5.0.1

Android 1.4.2 (OK)

IOS 9.3.2 (OK)

 

I have about 1 Million rows of data. I want to remove everything except IOS  or Android. Is there a way i can achieve it?

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

hi @Anonymous

 

You can do this with a Conditional Column in Query Editor

 

AddConditionalColumn.png

 

And if you have problem with Android and ANDROID (Case sensitive) (Following @ImkeF suggestion)

 

you can modify the M Code to:

 

IgnoreCaseSensitive.png




Lima - Peru

View solution in original post

8 REPLIES 8
Anonymous
Not applicable

Thank you so much for the help everyone. But in a column that has both Android and IOS following the versions. I just want to create a column that specifies, whether it is an Android or an IOS operating system.

So my results should something like this:

IOS

IOS

IOS

Android

Android

IOS

 

Instead of:

ios 8.3 (0.03K)

IOS 9.3.1 (1.49 k)

IOS 10.1

Android 5.0.1

Android 1.4.2 (OK)

IOS 9.3.2 (OK)

 

Is there a DAX query for that, or any other way to do it?

 

@Anonymous

 

Hello, To understand your Question, What is the difference between my answer and the result expected?.




Lima - Peru
Anonymous
Not applicable

Hello, I tried to do what you suggested and succeeded. Thank you so much for your help. Really appreciate it. Cat Happy

 

I just wanted to understand, what if there were Blank values in the column and I want to include that along with Android and IOS. Is there a way to do that too?

 

@Anonymous

 

You can add a new condition in the Conditional Column to IOS. ---> IOS And ELSE Condition  leave blank or enter "Other OS".

 

 




Lima - Peru
Anonymous
Not applicable

Thank you so much for sharing the information. I really appreciate it

Vvelarde
Community Champion
Community Champion

hi @Anonymous

 

You can do this with a Conditional Column in Query Editor

 

AddConditionalColumn.png

 

And if you have problem with Android and ANDROID (Case sensitive) (Following @ImkeF suggestion)

 

you can modify the M Code to:

 

IgnoreCaseSensitive.png




Lima - Peru
ImkeF
Community Champion
Community Champion

In the query-editor, add a step to your table:

 

Filter = Table.SelectRows(<NameOfThePreviousStep>, each Text.Contains([MyColumn], "IOS", Comparer.OrdinalIgnoreCase) or Text.Contains([MyColumn], "Android", Comparer.OrdinalIgnoreCase))

 

This is hand-edited code from the standard-filter from the table-header, as you probably want a case-insensitive match here?

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

vanessafvg
Super User
Super User

you can filter in the query editor

 

ie.  drop down the column you want with the arrow key like ive done on product and click on text filters and select contains

 

Capture.PNGdd

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.