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

How to sum by day and then average ?

Hello

I have a fact table with the following components. First 3 columns are connected to their specific dimension tables on a many to one relationship. Column 4 shows a percentage value which is an occupation value of that room. If I sum all the occupation values for each room on each day, I will get the total occupation for that day. In my example below, room 1 on 20220901 has 0.75, 0.6 on 20220902 and 0.3 on 20220903.

 

idDimTimeidDimRoomidDimSessionDailyOccupation
20220901110.25
20220901120.25
20220901130.25
20220902150.5
20220902160.1
20220903170.1
20220903180.1
20220903190.1

 

I require through DAX to sum all the occupation values by day and then average them to get a montly occupation value.

 

will appreciate your advise

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , A new measure

 

Averagex(Values(Table[idDimTime]), calculate(Sum(Table[DailyOccupation] )) )

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

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , A new measure

 

Averagex(Values(Table[idDimTime]), calculate(Sum(Table[DailyOccupation] )) )

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
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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