Forum Discussion

kastriot's avatar
kastriot
Frequent Visitor
7 years ago
Solved

Average per quarter

Hello,

 

I am trying to get the average of the count of [Staff ID] per quarter and I was hoping someone can help me.

Please check the formulas on the right side to maybe have a better understanding of what I am trying to achieve.

 

So, I am trying to create a formula that takes into account all [Staff ID] MTD and divide it by the Max number of [Month no.]. Of course, I am open to any other approach that might give me the same results.

 

Thank you

 

 

  • kastriot

     

    You can use the following formula:

    Measure = CALCULATE (
            COUNT ( 'Table'[Staff ID] ),
            FILTER (
                All('Table'),
                'Table'[Quarter] <= MAX ( 'Table'[Quarter] )
            )
        )
    / MAX('Table'[Month No])

     

    Workspace on this link.

2 Replies

  • themistoklis's avatar
    themistoklis
    Community Champion

    kastriot

     

    You can use the following formula:

    Measure = CALCULATE (
            COUNT ( 'Table'[Staff ID] ),
            FILTER (
                All('Table'),
                'Table'[Quarter] <= MAX ( 'Table'[Quarter] )
            )
        )
    / MAX('Table'[Month No])

     

    Workspace on this link.