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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Case and or Len formula based on column string values

Hi Experts

 

I am looking to add a second column to my table so if the value in

Column A has http://app.powerbi.com/ in the string at the start replace with Power BI and all other string values in column A to 

"Web link" in column B

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

I think maybe:

 

IF(SEARCH("http://app.powerbi.com/",[Column],,-1) = 1,"Power BI",[Column])

 

I'm not entirely clear on requirements. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
ImkeF
Community Champion
Community Champion

Hi @Anonymous 

In the query editor, add a column with the following formula:

if Text.StartsWith([ColumnA], "http://app.powerbi.com/") then "Web Link" else [ColumnA])

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

Greg_Deckler
Community Champion
Community Champion

I think maybe:

 

IF(SEARCH("http://app.powerbi.com/",[Column],,-1) = 1,"Power BI",[Column])

 

I'm not entirely clear on requirements. 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks Greg. Prefect

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors