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

Summary Column by End of Week

Hello,

I'm trying to calculate a column that will summarize [SUMMARY] hours by End of Week.  There could be a number of PAY TYPES.

 

SAMPLE TABLE

EMP ID

DATE               

HOURS 

PAY TYPE       

END OF WEEK 

SUMMARY

18/22/20210Regular8/28/202140
18/23/20218Regular8/28/202140
18/24/20218Regular8/28/202140
18/25/20218Regular8/28/202140
18/26/20218Regular8/28/202140
18/27/20218Regular8/28/202140
18/28/20218Overtime8/28/20218

 

Thanks in advance! 

1 ACCEPTED SOLUTION

@Anonymous

pls try to create a column

Column = CALCULATE(sum('Table'[hours]),ALLEXCEPT('Table','Table'[EMP ID],'Table'[Pay type],'Table'[end of week]))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

9 REPLIES 9
Ashish_Mathur
Super User
Super User

Hi,

This calculated column formula works

=CALCULATE(SUM(Data[HOURS]),FILTER(Data,Data[END OF WEEK]=EARLIER(Data[END OF WEEK])&&Data[EMP ID]=EARLIER(Data[EMP ID])&&Data[PAY TYPE]=EARLIER(Data[PAY TYPE])))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Desired output: 

walkerb32_1-1629143819027.png

 

@Anonymous 

could you pls provide some sample data?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

I hope this helps....

 

walkerb32_0-1629204820585.png

 

@Anonymous 

I am confused about this. I have seen this in your prevous reply. Is this your sample data or expected output?  If this is the sample data, could you pls provide the expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

The expected output is the SUMMARY column. 

@Anonymous

pls try to create a column

Column = CALCULATE(sum('Table'[hours]),ALLEXCEPT('Table','Table'[EMP ID],'Table'[Pay type],'Table'[end of week]))

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




amitchandak
Super User
Super User

@Anonymous , the expected output is not clear

 

Anonymous
Not applicable

Apologies, formatting error.  Screenshot below:

 

walkerb32_0-1629143346803.png

 

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.