Forum Discussion
How to: IF statement then a columnA+columnB in power query
Hi All,
Hope you are doing great.
I tried to have a custom column where when Column X ="x" then Column A + Column B else Column A + Column C
But it throw me an error. Down below I include a screenshot for better understanding of my question:
Need help in this. Thank you!
- Anonymous4 years ago
Hi Anonymous ,
It looks like you are trying to concatenate data.
This is usually due to you having a column that is not in text format, possibly in numeric format.
Try to use Number.ToText function to format the numeric value number to a text value
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- BA_Pete
Super User
Hi Anonymous ,
Try removing these brackets:
Pete
- AnonymousNot applicable
Tried that, but still the same.
- Vijay_A_Verma
Most Valuable Professional
You need to use smallcase in If, hence just replace If with if and problem will be solved. You have already corrected the syntax using Ba_Pete's suggestions.
- AnonymousNot applicable
Hi Anonymous ,
It looks like you are trying to concatenate data.
This is usually due to you having a column that is not in text format, possibly in numeric format.
Try to use Number.ToText function to format the numeric value number to a text value
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.