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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors