Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

Average Count by hours

Hi,   New to PBI and wondering how I can calculate the average number of cases by hour. Data is a list of cases and I've created a measure Count = countrows(Incident). Through this I can see the nu...
  • Vvelarde's avatar
    9 years ago

    hi Anonymous

     

    try with this:

     

     

    Avgxhora =
    VAR HoraCreacion =
        FIRSTNONBLANK ( Table1[Hora Creación], Table1[Hora Creación] )
    RETURN
        DIVIDE (
            CALCULATE ( COUNTROWS ( Table1 ), ALLEXCEPT ( Table1, Table1[Hora Creación] ) ),
            COUNTROWS (
                SUMMARIZE (
                    FILTER ( ALL ( Table1 ), Table1[Hora Creación] = HoraCreacion ),
                    Table1[Hora Creación],
                    Table1[Mes Creación]
                )
            )
        )