Forum Discussion

MatH's avatar
MatH
Frequent Visitor
2 years ago
Solved

Issues with Duration type

Hi,   I have a CSV with columns for thing like talk time, IVR time. Currently Power BI is recognising them as the type of Time, but they should be duration. It's formatted as HH:MM:SS in the file. ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi MatH 

     

    This is because the Duration data type is not supported in Report view. It only exists in Power Query Editor currently.

     

    The Data Type dropdown selection in Power Query Editor has two data types not present in Data View or Report View: Date/Time/Timezone and Duration. When you load a column with these data types into the Power BI model, a Date/Time/Timezone column converts into a Date/time data type, and a Duration column converts into a Decimal number data type. The decimal number represent a duration in Day unit. 

     

    Based on above, a common practice at present is to use DAX to convert the decimal number into hours or minutes or seconds for calculating the average/max/min/.... Then format the result into Text type to make them display similar to a time. But this practice has a problem if you want to display them in visuals which expects numeric values. 

     

    Or you can try another workaround from Chelsie Eiden's Duration - Microsoft Fabric Community. It resolved the above concern. 

     

    Hope this will be helpful. 

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!