Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Convert two datatypes in one column to one

Hi, I am relatively new to Power BI and am trying to convert two data types from one column to one. I have a column called ACD Time and some of the values are in time format(hh:mm:ss) and some of it has been converted to decimal numbers at the source. When I try to convert this column into time format, the decimal numbers are formatted correctly, but I am getting an error for values in (hh:mm:ss) format. Is there a way to compete this formatting process for all values.

 

 

 and after formatting these are the errors

 

 

 

  • Anonymous 

    Click on custom Column and add the following code

    try Time.From(Number.From([123 AUX Time])) otherwise Time.From([123 AUX Time])

     

     

  • Anonymous's avatar
    Anonymous
    5 years ago

    Thanks, It worked.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks, It worked.

  • Anonymous 

    Click on custom Column and add the following code

    try Time.From(Number.From([123 AUX Time])) otherwise Time.From([123 AUX Time])