Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Dynamic yesterday until specific time and today date

Hi all I need a measure to show dynamic yesterday and today date.   The logic is show yesterday's date until today 3:00 PM (Australian time) and after this time show today's date.   Then I will ...
  • v-janeyg-msft's avatar
    5 years ago

    Hi, Anonymous 

     

    According to your description, I think you can easily create a calculated column to show the results.

    Like this:

    Column =
    VAR a =
        HOUR ( 'Table'[Column1] )
    RETURN
        IF (
            a <= 15,
            DATE ( YEAR ( 'Table'[Column1] ), MONTH ( 'Table'[Column1] ), DAY ( 'Table'[Column1] ) ) - 1,
            DATE ( YEAR ( 'Table'[Column1] ), MONTH ( 'Table'[Column1] ), DAY ( 'Table'[Column1] ) )
        )
    

     

    If it doesn’t solve your problem, please feel free to ask me.

     

    Best Regards

    Janey Guo

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.