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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
likensj
Frequent Visitor

Averaging a distinct count by hour of day

FIrst, I have spent several hours looking at and attempting solutions for averaging a distinct count, without success. I am not exactly new to power bi, but I use it very infrequently until recently and I am hoping someone form the community can help. 

 

The scenario is I have a column ePCR that also has a date/time field that is associated, the ePCR number is unique and I am able to use distinct counts, what I am looking to achieve is a average of that distinct count by hour of day. I have transformed the date field into separate dates and times and have also created a column called hour of day, that contains the integer version of the hour, i.e., 0-23. Lastly, I have created a Date Table that is joined as a 1-many.  Any help would be greatly appreciated. 

RNDB #ResponsesPSAP Date & Time
191134911/1/20 0:13
191135011/1/20 0:14
191135111/1/20 1:24
191135211/1/20 1:48
191135311/1/20 2:05
191135411/1/20 2:56
9611/1/20 4:45
191135511/1/20 7:01
191135711/1/20 8:21
191135811/1/20 9:17
191135911/1/20 9:55
191136011/1/20 10:13
191136111/1/20 10:39
191136311/1/20 11:24
191136411/1/20 12:31
26111/1/20 13:14
191136511/1/20 13:16
191136611/1/20 13:19
191136711/1/20 13:29
191136811/1/20 13:31
191136911/1/20 13:31
27111/1/20 13:31
191137011/1/20 13:51
28211/1/20 14:10
191137111/1/20 15:29
191137211/1/20 15:46
3 REPLIES 3
smpa01
Super User
Super User

@likensjbased on the data provided what is your desired outcome?

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Ultimately, I would like an average by hour in a bar chart that would be in context of different variables such as location, month, year, etc.  The chart below is an example of county by day-I would arrange the average by day similarly.

 

likensj_0-1614719771281.png

 

Hi, @likensj

Your table data and screenshots make me feel even more confused, it seems that they are irrelevant.

Can you elaborate on the sample data provided? Except for the "Date and Time" field you provided, what do the other two fields (RNDB#, response) mean? Sample pbix file will make it easier for us to understand your question.

 

If you just need to create a bar chart with'hour' as the axis, you may need to create another calculated column column'Hour' and calculted table ,then build relationships between them.
calculatd column:

Hour = FORMAT('Table'[PSAP Date & Time],"h")


calculated table:

Hour = GENERATESERIES(0,23,1)


Best Regards,
Community Support Team _ Eason

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.