Forum Discussion

rodneyc8063_1's avatar
7 years ago
Solved

TODAY() - Measure vs Calculated column differences?

Pardon the question - But I am still learning the ropes with Power BI

 

I just came across something that Im not sure why its happening

 

Very simple - I created a new table and a new calculated column TEST=TODAY()

 

I then chose the table view with this column and was expecting to see simply todays date

 

I see that it actually returns a hierarchy of dates starting from 1900.

 

When I use the exact same formula in a MEASURE column though, this returns my expected output of just todays date.

 

I thought I had a grasp of measure vs calculated columns, but am confused why with the most simplest formula/function that it actually yields a totally different output?

 

Calculated column = TODAY()

Measure = TODAY()

 

Yields the below

 

  • Hi rodneyc8063_1 

    Based on my experience, use "TODAY( )" in a calcuated column will get a columns show today's date, this would not change everyday dynamically.

    Look my example,

    Create a new table by this formula (Modeling tab->New table)

    Table = CALENDAR(DATE(2019,3,20),TODAY())

    Then Modeling tab->New column, enter the fomula

    Column = TODAY()

     

    But your test table is werid.

    Maybe you use the wrong method to test.

    Please test as i do above, then you will see the correct result.

     

    Best Regards

    Maggie

     

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

3 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi rodneyc8063_1 

    Calcuated columns is static, measures can be dynamic with the slicer.

    Reference: how to differ measure and calculated column

     

    From your screenshot, the "Calculated column" seems werid.

    If you create a Calculated column, it should equal to 2019/3/25 when creating it yestoday,

    then when opening the file today, it remains 2019/3/25.

     

    You say "I created a new table and a new calculated column TEST=TODAY()", 

    As tested, when opening a blank pbix file, only "new table" enabled, others are disabled,

    So it is strange what you have done.

    Could you show some details?

     

    Best Regards

    Maggie

     

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

  • v-juanli-msft's avatar
    v-juanli-msft
    Community Support

    Hi rodneyc8063_1 

    Based on my experience, use "TODAY( )" in a calcuated column will get a columns show today's date, this would not change everyday dynamically.

    Look my example,

    Create a new table by this formula (Modeling tab->New table)

    Table = CALENDAR(DATE(2019,3,20),TODAY())

    Then Modeling tab->New column, enter the fomula

    Column = TODAY()

     

    But your test table is werid.

    Maybe you use the wrong method to test.

    Please test as i do above, then you will see the correct result.

     

    Best Regards

    Maggie

     

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