Forum Discussion
Custom Column Query
- 4 years ago
Hi Anonymous ,
M code is completely case-sensitive, so using 'IF' instead of 'if' will cause the calculation to fail. Similarly, referencing '1' instead of ' "1" ' if the value is in a text field will also fail.
Also, your condition is picking out the 1 = pass criteria first. It's simpler to pick out the 0 = Fail first, then just apply pass to 1 and null as per your requirement.
Try these calculations to see what works for you:
// [Attend Pass] = numeric if [Attend Pass] = 0 then "Fail" else "Pass" // [Attend Pass] = text if [Attend Pass] = "0" then "Fail" else "Pass"Pete
Hi Anonymous ,
M code is completely case-sensitive, so using 'IF' instead of 'if' will cause the calculation to fail. Similarly, referencing '1' instead of ' "1" ' if the value is in a text field will also fail.
Also, your condition is picking out the 1 = pass criteria first. It's simpler to pick out the 0 = Fail first, then just apply pass to 1 and null as per your requirement.
Try these calculations to see what works for you:
// [Attend Pass] = numeric
if [Attend Pass] = 0 then "Fail" else "Pass"
// [Attend Pass] = text
if [Attend Pass] = "0" then "Fail" else "Pass"
Pete