Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

How to calculate hours?

I have a column with datetime and I wanna calculate all hours. I used this one measure but I got wrong hours

 

 
hourcacl = SUMX('table'; hour('table'[datetime]))
 
The table look like that, the measure above should show it's 14 hours, instead summarize and show me 225 hours.
 

2 Replies

  • calerof's avatar
    calerof
    Icon for Impactful Individual rankImpactful Individual

    Hi Anonymous ,

     

    Do you already have a Date Table?

     

    If so, you could try COUNTX instead.

     

    Cheers,

     

    Fernando

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      No it doesen't work using Countx will only count the row and not acctual how many hours