Forum Discussion

bdehning's avatar
bdehning
Icon for Post Prodigy rankPost Prodigy
4 years ago
Solved

Null Vales and Time Column

Is there a way to replace null values with other text in a Time Column?    

 

When I use the column for a Table, it shows all nulls as Blank and I would like other text.   

  • Hi, bdehning 

     

    The data type of a column has to be the same. The value in the middle of the time column cannot be converted to a text value.

    Column = IF([Time]=BLANK(),TIME(0,0,0),[Time])

    Does this solve your problem?

     

    Best Regards,

    Community Support Team _Charlotte

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

3 Replies

  • bdehning , In power query you can do replace null ( all small null) with a value. But make sure you choose timeline 00:00:00  or  0 else data type conversion might fail

     

    Power Query Replace Value: https://youtu.be/hkZhZbR7Kmk

     

    In Dax new column

    coalesce([Time], time(0,0,0) )

  • Even if you can do that, you should not because in a single column the same data type should be maintained.

  • v-zhangti's avatar
    v-zhangti
    Icon for Community Support rankCommunity Support

    Hi, bdehning 

     

    The data type of a column has to be the same. The value in the middle of the time column cannot be converted to a text value.

    Column = IF([Time]=BLANK(),TIME(0,0,0),[Time])

    Does this solve your problem?

     

    Best Regards,

    Community Support Team _Charlotte

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