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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Daily average in calculated column

Hi Community,

I'm trying to find a way to calculate a daily average of a hourly prices of a certain market on historic series of 5 years. I need it in a column once I need to take that figures for a further join table.

The data is in this "Sample Table":

DatePrice
2021-05-065
2021-05-063
2021-05-061
2021-05-061
2021-05-062
2021-05-052
2021-05-053
2021-05-051
2021-05-054
2021-05-055

 

And the desired output is this format:

DatePriceDaily avg
2021-05-0652.4
2021-05-0632.4
2021-05-0612.4
2021-05-0612.4
2021-05-0622.4
2021-05-0523
2021-05-0533
2021-05-0513
2021-05-0543
2021-05-0553

 

I'm trying to use:

Daily Avg = 

calculate(AVERAGE("Sample Table"[Price]),"Sample Table"[Date]), but output is the hourly price for each row, instead of the average.
 
Any clue on this, please?
 
Thanks in advance.
 
Best regards
1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @Anonymous 

take a look at the following solution:

 

06-05-_2021_15-41-18.png

 

Average by Day = 
CALCULATE ( AVERAGE ( 'Table'[Price] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thanks @FrankAT and @amitchandak for your tips and help!

Cheers

FrankAT
Community Champion
Community Champion

Hi @Anonymous 

take a look at the following solution:

 

06-05-_2021_15-41-18.png

 

Average by Day = 
CALCULATE ( AVERAGE ( 'Table'[Price] ), ALLEXCEPT ( 'Table', 'Table'[Date] ) )

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

amitchandak
Super User
Super User

@Anonymous , Try a new column like

 

averageX(filter(Table, [Date] =earlier([Date])),[Price])

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

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors