Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Average count in each month

Hi,   I tried to calculate the average of number of employee in each month. Here's the example of my data, there is no duplicate of employee id in each month.   The result i would like to ...
  • FreemanZ's avatar
    FreemanZ
    3 years ago

    hi Anonymous 

    I overlooked the filter context, try like:

     

    measure = 
    DIVIDE(
       COUNTROWS(
            FILTER(
               ALL(data), 
               data[Month]<=MAX(data[Month])
            )
        ),
       MAX(data[Month]) 
    )

     

    tried with your original dataset, it worked like: