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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Average Per Hour

Hello all,

 

I need to display in a visual Card the average per hour in total.

I have the following Fact table:

IdQuantityExecutedDimStartTime_id
12011:54:51
2111:55:12
3311:55:15
4411:55:18
52011:58:16
6111:58:55
7311:59:02
8411:59:05
92011:59:48
10111:59:55
11311:59:59
12412:00:02
132013:18:51
14113:19:03
15313:19:07
16413:19:10
17115:06:50
18115:07:27
19115:07:39
20115:08:21

 

And the DimTime table:

IdHourMinuteSecondCompleteTime
00:00:000001900-01-01 00:00:00.000
00:00:010011900-01-01 00:00:01.000
00:00:020021900-01-01 00:00:02.000
00:00:030031900-01-01 00:00:03.000
00:00:040041900-01-01 00:00:04.000
00:00:050051900-01-01 00:00:05.000
00:00:060061900-01-01 00:00:06.000
00:00:070071900-01-01 00:00:07.000
00:00:080081900-01-01 00:00:08.000
00:00:090091900-01-01 00:00:09.000
00:00:1000101900-01-01 00:00:10.000

 

This table has all the possible time slots and it continues but for the example I think I don't need to show.

 

So my main goal here is to calculate the average of the QuantityExecuted per hour but to show it in a Card. 

Is there a way to build a measure that gives me the "total" average by hour.

 

I know that in a graph I can calculate the average per hour. And I already have that but now I need to calculate in total to show only one value.

 

Thanks in advance,

Rui

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , create hour as time  in your table 

or use hour column

 

example

averagex(values(Time[Hour]), calculate(sum(Table[Quantity])))

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

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , create hour as time  in your table 

or use hour column

 

example

averagex(values(Time[Hour]), calculate(sum(Table[Quantity])))

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
Anonymous
Not applicable

Hello @amitchandak ,

 

Thank you for your reply. It was correct. I found out some example but was not totally correct.

 

Thanks and have a nice day,

Rui

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
Top Kudoed Authors