Forum Discussion

ShawnPrice's avatar
ShawnPrice
Helper I
6 years ago
Solved

Conditional formatting for time

I"m looking for a way to do a conditional format on the table below. I have users who log in each day of the week. If they log in after 8:05:00 AM I want that day to highlighted in a Red.   Step 2 If possible then do a count of how red squares I have for that user.


23-Mar      24-Mar               25-Mar      26-Mar        27-Mar       30-Mar       31-Mar

8:15:00 AM 8:00:00 AM 8:01:00 AM 8:00:00 AM 7:59:00 AM 8:11:00 AM 7:56:00 AM

  • Anonymous's avatar
    Anonymous
    6 years ago

    ShawnPrice 
    Try follow the steps:

    1. In query editor, select the two columns and then unpivot: 

     

    2. Close apply, create a flag measure

     

    flag = IF(SUM('Table'[Value])>TIMEVALUE("8:05:00"),1,0)

     

     

    3. Create a conditional format for Value column, rule by the flag measure

    Paul Zheng _ Community Support Team
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

7 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    ShawnPrice - Is your time an actual date/time or text? If it is actual date/time, then it is really a decimal number of 1/24/60/60 essentially and you could set you parameters accordingly.

  • Anonymous's avatar
    Anonymous
    Not applicable

    ShawnPrice 
    Try follow the steps:

    1. In query editor, select the two columns and then unpivot: 

     

    2. Close apply, create a flag measure

     

    flag = IF(SUM('Table'[Value])>TIMEVALUE("8:05:00"),1,0)

     

     

    3. Create a conditional format for Value column, rule by the flag measure

    Paul Zheng _ Community Support Team
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • ShawnPrice's avatar
      ShawnPrice
      Helper I

      So it worked for a few of the times & users before 8:06, you can see some of them are working. Not sure why that would be, The Time fieid is a Time Data Type.

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        ShawnPrice 

        This is strange, only 6:34:00 AM gets wrong value, I have spent sometime on creating a few samples and did not met that issue. I will follow up when I figure it out. And please leave a update if you fixed it too.

         


        Paul Zheng _ Community Support Team
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.