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
Bolexle
New Member

Average of 4 options over Time

I am trying to create an average count where I have specific date spreads.

 

For now I have 3 relevant columns:

 

1 column has 4 different string options, for example, fruits: [apples, oranges, pears, bananas]

 

another is a start of hour tracker for said data,

 

and another is a data pulled timer, where data is pulled every 5 minutes.

So for an example table, you could have:

FruitsStartOfHourDataPulledTime
apple2019-06-03 10:00:00 AM2019-06-03 10:00:00 AM
orange2019-06-03 10:00:00 AM2019-06-03 10:05:00 AM
orange2019-06-03 10:00:00 AM2019-06-03 10:10:00 AM
banana2019-06-03 10:00:00 AM2019-06-03 10:05:00 AM
banana2019-06-03 10:00:00 AM2019-06-03 10:10:00 AM
banana2019-06-03 10:00:00 AM2019-06-03 10:10:00 AM

 

What I want to make is a bar graph that shows in hourly chunks, the average number of fruits. So for this piece of data, the expected outcome for the 10am hourly chunk would be:

 

.083 apples (only 1 apple was eaten in 12 update cycles, meaning  you only have on average 1/12th of an apple)

.16 oranges (1 orange eaten for 2 of the 5 minute cycles, none for the rest, so the average is .16)

.25 bananas(1 banana eaten 1 cycle, 2 eaten 1, and none the rest.)

 

Anyone have a good idea on how to implement this?

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Bolexle ,

 

You may just try the measure below.

Measure =
DIVIDE ( COUNTROWS ( Table1 ), 12 )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@Bolexle ,

 

You may just try the measure below.

Measure =
DIVIDE ( COUNTROWS ( Table1 ), 12 )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.