Forum Discussion

Tdawg90's avatar
Tdawg90
Icon for Microsoft Employee rankMicrosoft Employee
5 years ago

How to create percentiles for pre-aggregated data with 'TotalTime', and a 'UnitCount'

Hi, 

We do a fair amount of aggregation prior to pulling it into power bi.  

 

The data table looks something along the lines of 

ReportDatePivot FieldPivot fieldUnitCountTotalTime
7/15/2021ba23455
7/15/2021aa122148
7/16/2021sd1221
7/17/2021dd454
7/17/2021ds446

 

 

 

 

I have a Measure to report on the average

 

Avg Minutes = SUM([TotalTime]) / SUM([UnitCount])

 

 

 

and a few percentiles

 

80th Percentile Avg Time = PERCENTILEX.EXC(myTable, [Avg Minutes], .80)
80th PercentileTime = PERCENTILE.EXC(myTable[TotalTime], 0.8)

 

 

 

However I need the percentiles to leverage the unit counts, rather than, I think it's using the row count?

 

Can this be done directly utilizing these methods?

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Tdawg90 ,

     

    Can you describe your expected result through your sample data.

     

    Best Regards,

    Liu Yang

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