Forum Discussion

Noak's avatar
Noak
Icon for Helper IV rankHelper IV
8 years ago
Solved

last night alerts

Hello,

I would like to count last night alerts and see the difference from 2 night ago .

 

How can I calculate it?.

night is between 22:00 PM to 6 AM.

 

 

thank yoy =).

  • Noak

     

     

    To count a night, you may add a flag column to tag if an entry is "night" or not.

     

    IsNight=
    IF ( [StartTime] <= TIME ( 22, 0, 0 ) && [EndTime] > TIME ( 6, 0, 0 ), 1, 0 )

    Then you can count "1" values in above column.

     

     

    What do you mean "difference from 2 nights ago"? Can you share some sample data and expected result?

     

    Regards,

3 Replies

  • v-sihou-msft's avatar
    v-sihou-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Noak

     

     

    To count a night, you may add a flag column to tag if an entry is "night" or not.

     

    IsNight=
    IF ( [StartTime] <= TIME ( 22, 0, 0 ) && [EndTime] > TIME ( 6, 0, 0 ), 1, 0 )

    Then you can count "1" values in above column.

     

     

    What do you mean "difference from 2 nights ago"? Can you share some sample data and expected result?

     

    Regards,

    • Noak's avatar
      Noak
      Icon for Helper IV rankHelper IV

      Tnx for your replay v-sihou-msft

       

      I would like to compare tonigh amount of alerts to a night before amount of alerts and to present the changes in % (if theres an increase or decrease).