Forum Discussion

Sowparni's avatar
Sowparni
Frequent Visitor
4 years ago

Issue with Duration datatype

I have a table in Power BI desktop where the Time on Page shows a duration as 00:43:18, which means 43 mins and 18 seconds on a particluar page.

But when I publish the report to Power BI online, the data is converted to 12:43:18 AM.

Is there a way to retain the duration type for the data?

 

6 Replies

  • mattww's avatar
    mattww
    Responsive Resident

    Hi Sowparni 

     

    That is strange, I got the example you gave to work by changing the format. I'm not sure how it would behave if the duration rolled over 24 hours, but I don't know if that's an issue for you

     

     

     

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

    • Sowparni's avatar
      Sowparni
      Frequent Visitor

      The formet is set to what you have mentioned.

      But on Power BI online, this is what I see:

       

      • mattww's avatar
        mattww
        Responsive Resident

        Hi Sowparni 

         

        Sorry to see that's not working, it does it on my side. I'm in UK so maybe some localisation might explain some difference

         

         

         

        This doesn't seem like intended behaviour to me since it is a duration data type. Have you contacted Microsoft Support?

         

         

         

  • v-chenwuz-msft's avatar
    v-chenwuz-msft
    Community Support

    Hi Sowparni ,

     

    I have test this and it works fine for me. 

    What's the mode of you data model? Direct Qurey or import?

    Have you try other broswers?

     

    Or

    You can try DAX expression:

     Format([Time on page], "hh:nn:ss")

    https://docs.microsoft.com/en-us/dax/format-function-dax#predefined-datetime-formats 

     

    Best Regards

    Community Support Team _ chenwu zhu

     

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