cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper III

## Population average from average

Hello, I try to count the average based on another average. My first measure is simple. It simply counts the average of the last 60 games for each player. Unfortunately it only works when you add two columns(player, Average_60) in the visualization

``````Average_60 =

VAR _score = AVERAGEX (TOPN (60,'public random_players','public random_players'[game_id]), 'public random_players'[game_score])

return  _score``````

Any way to count the population average based on each player's final scores from Average_60?

1 ACCEPTED SOLUTION
Resolver III

I would do something like below. Basically,. that table you created in your model, you create in memory in the measure, and then itterate over that to get your average. I guessed at where your players table comes from so you will need to change the table and column names as needed.

var tab1=SELECTCOLUMNS('public random_players', "Players", 'public random_players'[players], "playerAverage", [Average 60])
var result = AverageX(tab1, "playerAverage")
return result

~ Anthony Genovese
Need more PBI help? PM me for affordable, dedicated training or consultant recomendations!

3 REPLIES 3
Helper III

Currently, the way I did it was to create a new table with Player and Average_60 columns. In my measure I simply refer to this table as the average of Average_60. However, I would like to do it all in one measure if possible.

Resolver III

I would do something like below. Basically,. that table you created in your model, you create in memory in the measure, and then itterate over that to get your average. I guessed at where your players table comes from so you will need to change the table and column names as needed.

var tab1=SELECTCOLUMNS('public random_players', "Players", 'public random_players'[players], "playerAverage", [Average 60])
var result = AverageX(tab1, "playerAverage")
return result

~ Anthony Genovese
Need more PBI help? PM me for affordable, dedicated training or consultant recomendations!

Resolver III

So to clarify, you want to take an average over the list of players and their average_60?

~ Anthony Genovese
Need more PBI help? PM me for affordable, dedicated training or consultant recomendations!

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors