Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Count Average per User

Hi,   I have 10 participants in a survey and I want to calculate the average per user. This number I want to be a whole number so I can count the distribution of the participants from 1-5.   For...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous 

    I think Avg and GenCal are all measures. I think you can try Round function to get whole number. 

    My Sample:

    AvgGen = AVERAGE('Table'[Gen])
    GenCalc = ROUND([AvgGen],0)

    Result is as below.

    Then create a table from 1 to 5 and we need to add this column into X axis in column chart.

    X axis = 
    GENERATESERIES(1,5,1)

    Try my measure to count GenCalc.

    Measure = 
    COUNTAX(FILTER(VALUES('Table'[User]),[GenCalc]=MAX('X axis'[Value])),[User])

    Result is as below.

    Best Regards,
    Rico Zhou

     

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