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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to reflect new columns from Existing Database table

Hi,

I have a database that has 2 columns (FWork Main Aim and Standard Title).

I'm trying to create a custom column that says if FWork Main Aim begins with Non reg, then choose the Standard Title, otherwise choose the FWork Main Aim.

I've got as far as

=IF(LEFT(TRIM([FWork Main Aim]),7)="Non reg","[Standard Title]","[FWork Main Aim]")

I keep getting syntax errors, so would appreciate a formula that would do this for me.

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

The formula(M) below should work in your scenario. Smiley Happy

=IF(Text.Start(Text.Trim([FWork Main Aim]),7)="Non reg",[Standard Title],[FWork Main Aim])

 

Regards

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

Column=IF(LEFT(TRIM([FWork Main Aim]),7)="Non reg",[Standard Title],[FWork Main Aim])

@ 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!:
The Definitive Guide to Power Query (M)

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

I get the following error from that. It doesn't find any syntax errors (so much improvement on my attempt!), However, when I click ok i get the following

 

Expression.Error: The name 'Column' wasn't recognized.  Make sure it's spelled correctly.

Hi @Anonymous,

 

The formula(M) below should work in your scenario. Smiley Happy

=IF(Text.Start(Text.Trim([FWork Main Aim]),7)="Non reg",[Standard Title],[FWork Main Aim])

 

Regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.