Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Average time, not earliest or latest

We have an Time column, wich has information about how long user took to interate with our interface, the problem, is that when I put this value on Matrix table, on values, it's not possible to select to display as average, instead earliest or latest.

Any clues about it? 

  • Anonymous,

     

    It is because the data type is Time. PBI can not take the average of a time value.

     

    Does the data in the column need to be Time (like 12:32pm) or does it just represent the minutes that users interacted? In which case the data type can be a number type and you can take the average of that.

     

    Best,

     

    Alan

  • TomEvers2,

     

    Great observation! I was trying to figure out what it was going off of.

     

    Anonymous you can use the simple DAX formula below to create a new calculated column to convert the current decimal column (0.020262458) back to minutes:

     

    ='Table'[Column] * 1440

     

     

    1440 just represents the number of minutes in a day.

     

    Best,

     

    Alan

13 Replies

  • alanhodgson's avatar
    alanhodgson
    Icon for Solution Supplier rankSolution Supplier

    Hey Anonymous,

     

    What is the data type of the field you want the average of? Also, it is a calculated column or a measure? Finally are you working in PBI Desktop or the online service?

     

    Thanks,

     

    Alan

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi alanhodgson,

       

      Its a Time datatype.

      It's a clean column, i mean, it came direct from my database (SQL SERVER Time DataType)

      PBI Desktop

       

      TKS

      • alanhodgson's avatar
        alanhodgson
        Icon for Solution Supplier rankSolution Supplier

        Anonymous,

         

        It is because the data type is Time. PBI can not take the average of a time value.

         

        Does the data in the column need to be Time (like 12:32pm) or does it just represent the minutes that users interacted? In which case the data type can be a number type and you can take the average of that.

         

        Best,

         

        Alan