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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.