Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Pan_Forex
Helper III
Helper III

Average from every day

Hi guys! I wonder if it is possible to create a table that adds new rows every day and leaves the old ones unchanged. I have a table that is updated several times every day with new rows and a second table that counts the average for each player. 

 

     Date   ID Player Score
20.01.2023  1025  A       8       
20.01.20231025B4
20.01.20231025C5
20.01.20231025D7
18.01.20231020A6
18.01.20231020B5
18.01.20231020C5
18.01.20231020D5
18.01.20231020E4
18.01.20231020F6
17.01.2023958F5
17.01.2023958C6
17.01.2023958D5
17.01.2023958E3

Now it looks like this:

Player              Average Score
A7
B4.5
C5.33
D5.66
E3.5
F5.5

I would like the new table to count such a ranking from each day. It would add new updated scores every day, while leaving the old scores unchanged:

DatePlayer     Average Score
20.01.2023      A7
20.01.2023B4.5
20.01.2023C5.33
20.01.2023D5.66
18.01.2023A6
18.01.2023B5
18.01.2023C5.5
18.01.2023D5
18.01.2023E3.5
18.01.2023F5.5
17.01.2023F5
17.01.2023C6
17.01.2023D5
17.01.2023E3

 

2 ACCEPTED SOLUTIONS

@Pan_Forex 

Please try

New Table =
ADDCOLUMNS (
SUMMARIZE ( 'Table', [Date], 'Table'[Player] ),
"Average Score",
CALCULATE (
AVERAGE ( 'Table'[Score] ),
ALLEXCEPT ( 'Table', 'Table'[Player] ),
[Date] <= EARLIER ( [Date] )
)
)

View solution in original post

FreemanZ
Community Champion
Community Champion

hi @Pan_Forex 

this shall also work:

Table = 
ADDCOLUMNS(
    SUMMARIZE(
        TableName,
        TableName[Date],
        TableName[Player]
    ),    
    "Avg",
    VAR _date=TableName[Date]
    RETURN CALCULATE(
    AVERAGE(TableName[Score]),
    TableName[Date]<=_date
    )
)

 

FreemanZ_0-1674284207696.png

 

View solution in original post

6 REPLIES 6
FreemanZ
Community Champion
Community Champion

hi @Pan_Forex 

this shall also work:

Table = 
ADDCOLUMNS(
    SUMMARIZE(
        TableName,
        TableName[Date],
        TableName[Player]
    ),    
    "Avg",
    VAR _date=TableName[Date]
    RETURN CALCULATE(
    AVERAGE(TableName[Score]),
    TableName[Date]<=_date
    )
)

 

FreemanZ_0-1674284207696.png

 

tamerj1
Community Champion
Community Champion

Hi @Pan_Forex 

please try

Average Score =
CALCULATE (
AVERAGE ( 'Table'[Score] ),
ALLEXCEPT ( 'Table', 'Table'[Player] ),
[Date] <= MAX ( [Date] )
)

thank you for your reply. Your solution works but I would still like to have this data in a new table and not as a measure. Is this possible? 

@Pan_Forex 

Please try

New Table =
ADDCOLUMNS (
SUMMARIZE ( 'Table', [Date], 'Table'[Player] ),
"Average Score",
CALCULATE (
AVERAGE ( 'Table'[Score] ),
ALLEXCEPT ( 'Table', 'Table'[Player] ),
[Date] <= EARLIER ( [Date] )
)
)

amitchandak
Super User
Super User

@Pan_Forex , try a measure with help from the date table

 

Cumm Sales = CALCULATE(AverageX(Values('Date'[Date]), CALCULATE(SUM(Table[Score]))) ,filter(all('Date'),'Date'[date] <=max('Date'[date])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you for your reply. I would like the average to be calculated for each player separately and not all together from each day, and to create a new table with results only. 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.