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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Inquiry about hour calculation

Hi,

I try to extract the hour information from a time field, and I find the result is not always the same as the hour showed in the time data. For example, one is "6/22/2022 10:04:41 PM", the hour should be 22, however when I used hour(time) the result is 21. How to correct this problem? Thanks!

1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

this is what i get so think you need to share exactly what you doing 

 

vanessafvg_0-1664295011958.png

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

6 REPLIES 6
vanessafvg
Super User
Super User

this is what i get so think you need to share exactly what you doing 

 

vanessafvg_0-1664295011958.png

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




vanessafvg
Super User
Super User

can you please share your calculation or demonstrate how you are doing this. 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

I used this :   Hour( )

in dax? so you have field that has a date and time and it is a date time type? in it and you create a dax measure / column ?   please share a screenshot of the calc with the result.

 

calcuation = hour(datetimefield)?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Anonymous
Not applicable

Yes, I have a column which is date time type. I want to extract the Hour information and I used add a new column, and this new column =Hour(datetime). But the hour is not alway correct 

when you say its not always correct do you have another example or have you fixed it?  Also how are you placing it on your visual, you could be aggregating that column rather than removing the aggregate if you are doing multiple rows?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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