Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Cannot convert value '' of type Text to type Number.

I have a column that is a date but is in Text format and i have another column that is a text format as well. Im trying to add them both together into a seperate column to show new dates

 

I dont understand why i keep getting the error above even after i change the data type to date or number and back to text. 

 

This is the formula im using. 

 

Calculated Deadline = 'Table_Name (Calc)'[Dependent Completed Dates] + 'Table_Name (Calc)'[# of Days]
  • Anonymous 
    It's probably because you have empty strings there, you can check for the blanks or empty strings first and then execute otherwise do nothing:

     

    AddDate = 
    IF ( NOT(ISBLANK(Dates_Add[Dependent Completed Dates]) || Dates_Add[Dependent Completed Dates] = ""),DATEVALUE(Dates_Add[Dependent Completed Dates]) + VALUE('Dates_Add'[# of Days]))

     

     


    If I helped you and you found the solution, please kudo my messages and Accept them as the Solution. Thank you

10 Replies

  • Hi, Anonymous 
    If you want to add two strings (text) together you have to use this symbol & (instead of +) or function called:

    CONCATENATE

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Im attempting to add these two 

       

      • vojtechsima's avatar
        vojtechsima
        Icon for Super User rankSuper User

        Hi, Anonymous ,
        Make sure Date column is Date and # of Days is a number, then creating new Column should work like this:

        Column = Patients_Calendar[Date] + Patients_Calendar[Index]