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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

How to Get Formula to Work

Hi - I have this formula for a column in PowerBI: 

=IF(LEFT(vBI_ClientBankAccounts[Bank Account CUSIP],2)= "CD", "CD", IF(LEFT(vBI_ClientBankAccounts[Bank Account CUSIP],3)= "TBS", "TBS", "AMMA"))
 
I am getting this error: To use special characters in a column name, enclose the entire name in brackets ([]) and add a ] to any closing brackets in the name.
 
vBI_ClientBankAccounts is my data view and Bank Account CUSIP is the field/column I am trying to analyze.
 
Thank you! 
Shayla 
1 ACCEPTED SOLUTION

Hi !

Sorry, you need to remove, the enclosed single quotes from column name;

=IF(LEFT('vBI_ClientBankAccounts'[Bank Account CUSIP],2)= "CD", "CD", IF(LEFT('vBI_ClientBankAccounts'[Bank Account CUSIP],3)= "TBS", "TBS", "AMMA"))

 

Hopefully above DAX will work.

View solution in original post

4 REPLIES 4
HashamNiaz
Solution Sage
Solution Sage

Hi !

Please try using below DAX, enclosed table name in single quote;

 

=IF(LEFT('vBI_ClientBankAccounts'['Bank Account CUSIP'],2)= "CD", "CD", IF(LEFT('vBI_ClientBankAccounts'['Bank Account CUSIP'],3)= "TBS", "TBS", "AMMA"))

 
Regards,

Hasham

Anonymous
Not applicable

Hi Hasham - thanks for getting back to me. I tried this: 

=IF(LEFT('vBI_ClientBankAccounts'['Bank Account CUSIP'],2)= "CD", "CD", IF(LEFT('vBI_ClientBankAccounts'['Bank Account CUSIP'],3)= "TBS", "TBS", "AMMA"))
 
Now I get this error with the red squiggly lines below the fields:
 
Capture.JPG
Anonymous
Not applicable

Worked perfect, thank you so much!

Hi !

Sorry, you need to remove, the enclosed single quotes from column name;

=IF(LEFT('vBI_ClientBankAccounts'[Bank Account CUSIP],2)= "CD", "CD", IF(LEFT('vBI_ClientBankAccounts'[Bank Account CUSIP],3)= "TBS", "TBS", "AMMA"))

 

Hopefully above DAX will work.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors