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

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.