Forum Discussion
Count cases by Hour
I have 2 columns, CaseID and Referral Date. The Referral Date is a normal time format (MM/DD/YYYY HH:MM:SS AM/PM) and I am trying to count the CaseID by the hour they were referred.
How would I create a New Measure to do this? I can't seem to get the date to properly filter by hour.
11 Replies
- JarroVGITResident Rockstar
Can you give a sample of the data and your expected output?
- AnonymousNot applicable
- JarroVGITResident Rockstar
Please please please don't post pictures of data, typing over datetime values is the absolute no hobby of ours 😂
Can you just copy paste from Excel into the textbox please? Thanks
- AnonymousNot applicable
Hi Anonymous ,
There's no need to add new columns, please check following steps.
1# use Enter Data feature to create a table as below.
2# Create a measure as below.
count = COUNTROWS(FILTER(ALL('Table'),FORMAT('Table'[Time],"h")=FORMAT(SELECTEDVALUE('Table (2)'[hour]),"")))Result would be shown as below.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Thanks for help.
Unfortunately, I can't enter data either on my end. Everything is greyed out.
I just find it odd that Power BI recoginizes the date field as a "date" but there is no way I can create a new measure formatting it only by hour.
- AnonymousNot applicable
Anonymous ,
So you are using live connection mode to connect SSAS according to your screenshot? Otherwise the Enter Data feature won't be grayed out. If so I'm afraid you have to do the job in SSAS because many of the features of power bi are limited when using live connection.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.