Forum Discussion

DynamicsHS's avatar
DynamicsHS
Helper II
3 years ago
Solved

How to replace a value with todays date ?

Hi, 

 

I have a list of dates and some of them are presenting as '31/12/2154'. How can I change those rows listed as '31/12/2154' to todays date?

 

So that every time it refreshes, it shows todays new date. 

 

Thank you,

Henry

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi DynamicsHS ,

    Change the measure.

    measure = 
    IF ( MAX ( 'Table'[date] ) = DATE(2154,12,31), TODAY (), MAX('Table'[date]) )

    If I have misunderstood your meaing, please provide more details.

     

    Best Regards

    Community Support Team _ Polly

     

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

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi DynamicsHS ,

    Please have a try.

    Create a measure.

    measure =
    IF ( MAX ( table[date] ) = "31/12/2154", TODAY (), table[date] )
    

      

    Or add a custom column.

    if [date] = "31/12/2154" then DateTime.LocalNow() else [date]

     

    If I have misunderstood your meaing, please provide more details.

     

    Best Regards

    Community Support Team _ Polly

     

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

    • DynamicsHS's avatar
      DynamicsHS
      Helper II

      Hi Anonymous , 

       

      I am getting this error:

      the date is formatted as a date and not text?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi DynamicsHS ,

        Change the measure.

        measure = 
        IF ( MAX ( 'Table'[date] ) = DATE(2154,12,31), TODAY (), MAX('Table'[date]) )

        If I have misunderstood your meaing, please provide more details.

         

        Best Regards

        Community Support Team _ Polly

         

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