Forum Discussion

atjt217's avatar
atjt217
Helper III
4 years ago
Solved

Label status based on Time

Hello,  Would like to ask your help please? I have a table list of Appointment Dates and Times and I want to put a status to either Regular hours or After hours. It will be After hours if the appoin...
  • atjt217's avatar
    atjt217
    4 years ago

    I found a work around on this issue and wanted to share to everyone. Instead of using TIME i extracted the Hours on the Date column using Power Query and used this calculated column formula:

    Appointment Status = IF(vu_Bi_UnableToFill_2019ToCurrent[Hour] = 8, "Regular Hours",

    IF(vu_Bi_UnableToFill_2019ToCurrent[Hour] = 9, "Regular Hours",

    IF(vu_Bi_UnableToFill_2019ToCurrent[Hour] = 10, "Regular Hours",

    IF(vu_Bi_UnableToFill_2019ToCurrent[Hour]= 11, "Regular Hours",

    IF(vu_Bi_UnableToFill_2019ToCurrent[Hour]= 12, "Regular Hours",

    IF(vu_Bi_UnableToFill_2019ToCurrent[Hour]= 13, "Regular Hours",

    IF(vu_Bi_UnableToFill_2019ToCurrent[Hour]= 14, "Regular Hours",

    IF(vu_Bi_UnableToFill_2019ToCurrent[Hour] = 15, "Regular Hours",

    IF(vu_Bi_UnableToFill_2019ToCurrent[Hour] = 16, "Regular Hours",

    "After Hours")))))))))