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
jay_patel
Helper IV
Helper IV

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 highlighted in big box. Need to get like that in working hour row also. 
Tried with costum column by using formula -- 

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



Thank in Advance.

 

 Image1.JPG

2 ACCEPTED SOLUTIONS
Icey
Community Support
Community Support

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

hours.JPG

 

Best Regards,

Icey

 

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

View solution in original post

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.

View solution in original post

10 REPLIES 10
amitchandak
Super User
Super User

@jay_patel , this seems like a column. Also calculation seem fine

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

 

Thank you @amitchandak  for replying, here I am mentioning the sample of data. need to get workhours total as spent hours.

 

 

 

 

Image2.JPG

 

 

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.

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.

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.

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.

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.

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.

Don'@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,then consider Accepting it as the solution to help other members find it faster.

Icey
Community Support
Community Support

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

hours.JPG

 

Best Regards,

Icey

 

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

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.