Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Text and Date same column issue

Hi Experts

 

I have a column in my FACT Table which has both text "No" and a date in it. I want to create a second calculated column with an IF statement if the text is No then ignore, if the value is less then today's date then Retire.

  • you might need to create a duplicate column and split the date from the no.  That way it will be easier to manipulate the data.   You can then easily use date time functions against the date field.  are you able to share some data?

4 Replies

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    you might need to create a duplicate column and split the date from the no.  That way it will be easier to manipulate the data.   You can then easily use date time functions against the date field.  are you able to share some data?

    • Anonymous's avatar
      Anonymous
      Not applicable

      The data is simply 

      No

      01/012021

      No

      02/03/2021

      No

      Etc

       

      Need a measure really if possible 

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous , In power query, create two columns based on data.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hello Anonymous ,
    First, you have to split the column with date and no.
    Do you have all the dates with no? If yes you may try a calculated column.

    Retire= IF( 'Table'[Values] = "No" && 'Table'[Date] < TODAY(), "Retire")