Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Dear all,
I have writted below code to conditional custom column
if [Plnt]="776" and [DP]="0776" and [P] = "E" then "Manufactured"
else "other"
But column shows all values as "Other". But no syntax error found.
@d_gosbell , Can you check this?
Solved! Go to Solution.
Hi,
Does this work?
=if [Plnt]=776 and [DP]="0776" and [P] = "E" then "Manufactured" else "other"
Hope this helps.
Hi @Anonymous
I think there must be something in the evaluation of the if statement. Try to check the data type of your columns Plnt, DP, and P and update the formula accordingly.
I hope that could help
Regards
Hi,
Does this work?
=if [Plnt]=776 and [DP]="0776" and [P] = "E" then "Manufactured" else "other"
Hope this helps.
Specifically note the difference between the code for [DP] that @Ashish_Mathur posted compared to the code in your screenshot (not the code you pasted into this post which is different from the screen shot). [DP] is a text column so you need to compare it to "0776" if you type 0776 without the quotes this will get interpreted as the number 776 as the leading 0 is not significant in numeric values. You could test this yourself by temporarily creating 3 calc columns with each of the 3 conditions to see which one was not working as expected.