Forum Discussion
Custom Column
HI mgaut341 . The issue is likely due to grouping of your conditional statements.
Try this
if
[apptcancelreason] = "BLANK" and
(
[apptslotstatus] = "2 - Checked In" or
[apptslotstatus] = "3- Checked Out" or
[apptslotstatus] = "4 - Charge Entered"
) and
[apptdate] < DateTime.LocalNow()
then
"Appointment Completed"
With these modifications, appointments with a status of "2 - Checked In" should now be correctly marked as "Appointment Completed" instead of "No Show", as long as the other conditions are met. The rest of the logic remains the same.
Let me know if you have any more questions.
Thank you,
Abhinav
Thanks for the feedback. Unfortunately, that changed all of them to "No Show" instead of "Appointment Completed"
- mussaenda1 year ago
Community Champion
Hi mgaut341 ,
AbhinavJoshi is right with the condition grouping.
One more thing we need to check are the values we are declaring in conditions.
is "BLANK" really a BLANK word in all caps? (Note that Power Query is case sensitive)
Or is it null as in a null value? Because if it is null then we need to do = null instead of = "BLANK".
Hope this helps
- mgaut3411 year ago
Helper II
I've tried changing it to "null" but the same issue arises. 2-Checked In still shows up as No Show, while 3 & 4 show up at Appointment Completed
- Anonymous1 year agoNot applicable
Hi mgaut341 ,
There's nothing wrong with your logic per se, and there's nothing wrong with measuring it on my end.
But if by [apptcancelreason] = “BLANK” you mean that there is nothing in the cell, then change the M code to [apptcancelreason] = “” with nothing in between the double quotes and no spaces and try again.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.