Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

How to Round to Start Hour, DirectQuery!

Dear all, I need to round current time to the start hour, but i'm working in direct query. When i try do this on "edit query" tell me that's not supported in direct query mode. I need to...
  • v-lid-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    We can create a calculated column to meet your requirement:

     

    StartHour = 
    [DateTime]
        - DIVIDE ( MINUTE ( [DateTime] ), 60 * 24, 0 )
        - DIVIDE ( SECOND ( [DateTime] ), 3600 * 24, 0 )

     

     


    Best regards,