The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 # | Responses | PSAP Date & Time |
1911349 | 1 | 1/1/20 0:13 |
1911350 | 1 | 1/1/20 0:14 |
1911351 | 1 | 1/1/20 1:24 |
1911352 | 1 | 1/1/20 1:48 |
1911353 | 1 | 1/1/20 2:05 |
1911354 | 1 | 1/1/20 2:56 |
96 | 1 | 1/1/20 4:45 |
1911355 | 1 | 1/1/20 7:01 |
1911357 | 1 | 1/1/20 8:21 |
1911358 | 1 | 1/1/20 9:17 |
1911359 | 1 | 1/1/20 9:55 |
1911360 | 1 | 1/1/20 10:13 |
1911361 | 1 | 1/1/20 10:39 |
1911363 | 1 | 1/1/20 11:24 |
1911364 | 1 | 1/1/20 12:31 |
261 | 1 | 1/1/20 13:14 |
1911365 | 1 | 1/1/20 13:16 |
1911366 | 1 | 1/1/20 13:19 |
1911367 | 1 | 1/1/20 13:29 |
1911368 | 1 | 1/1/20 13:31 |
1911369 | 1 | 1/1/20 13:31 |
271 | 1 | 1/1/20 13:31 |
1911370 | 1 | 1/1/20 13:51 |
282 | 1 | 1/1/20 14:10 |
1911371 | 1 | 1/1/20 15:29 |
1911372 | 1 | 1/1/20 15:46 |
@likensjbased on the data provided what is your desired outcome?
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.
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
User | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
183 | |
80 | |
62 | |
46 | |
38 |