Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |