cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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:

 Fruits StartOfHour DataPulledTime apple 2019-06-03 10:00:00 AM 2019-06-03 10:00:00 AM orange 2019-06-03 10:00:00 AM 2019-06-03 10:05:00 AM orange 2019-06-03 10:00:00 AM 2019-06-03 10:10:00 AM banana 2019-06-03 10:00:00 AM 2019-06-03 10:05:00 AM banana 2019-06-03 10:00:00 AM 2019-06-03 10:10:00 AM banana 2019-06-03 10:00:00 AM 2019-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
Community Support

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.
Community Support

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.

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

#### Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors