Forum Discussion

jay_patel's avatar
jay_patel
Icon for Helper IV rankHelper IV
5 years ago
Solved

Need Total for Working Hours

Hi Friends,   I am trying to get Total Working Hours as total value in subtotals like as spent hours. But now getting. Here mentioning the image Like mentioned in image need to like spent hour hi...
  • Icey's avatar
    Icey
    5 years ago

    Hi jay_patel ,

     

    It is suggested to create a calculated column in your fact table, not in the Date table like below:

    Working Hours =
    CALCULATE (
        SUM ( 'Date'[WorkingDay] ),
        FILTER ( 'Date', 'Date'[Month-Year] = EARLIER ( 'Table'[Month-Year] ) )
    ) * 8
    

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Syndicate_Admin's avatar
    Syndicate_Admin
    5 years ago

    Don't @jay_patel,

    It is suggested to create a calculated column in the fact table, not in the Date table as follows:

    Working Hours =
    CALCULATE (
        SUM ( 'Date'[WorkingDay] ),
        FILTER ( 'Date', 'Date'[Month-Year] = EARLIER ( 'Table'[Month-Year] ) )
    ) * 8
    

    hours.JPG

    Best regards

    ice cream

    If this post helps, consider Accepting it as the solution to help other members find it faster.