Forum Discussion
Anonymous
5 years agoNot 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
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.
4 Replies
- HashamNiazSolution 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
- AnonymousNot 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:- HashamNiazSolution Sage
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.