Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi All,
I want to add a column in my existing table in Power BI Query Editor using add custom column. The formula that I want to use is that:
If column A = "#" then value in column B else column A.
I cannot construct the formula since I am receiving a Token Literal expected. Thanks in advance!
Solved! Go to Solution.
Hi,
you may want to check if you wrote the "if" function in the rigth syntax since a little mistype could possibly couse error.
I didn't get an error with the following formula following yours.
if [column a] = "#" then [column a] else [column b]
Hi @justin22pogi,
Have you solved your problem with the reply provided by @Barnee?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please share some screenshots to specify your problem.
For further, you could have a view of the syntax of IF FUNCTION in Power Query.
Best Regards,
Cherry
Hi,
you may want to check if you wrote the "if" function in the rigth syntax since a little mistype could possibly couse error.
I didn't get an error with the following formula following yours.
if [column a] = "#" then [column a] else [column b]
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
73 | |
58 | |
36 | |
32 |
User | Count |
---|---|
90 | |
62 | |
61 | |
49 | |
45 |