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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
pauljohnson
Frequent Visitor

Grouping lines of data together in a measure

Hi,

I want to be able to create a measure, that will give me total hours worked (Weekly Hours), I have multiple lines with same WorkerID, Week No and Year but want to group hours worked based on all these being the same. 

It should only be displaying one row for each grouped set so in example below, just the lines with Weekly hours, I do get this, but the weekly hours seem to be way out on each line.

I have the below data

 

pauljohnson_0-1628008888159.png

I was using this measure, but it doesn’t seem to be working

 

Weekly Hours = CALCULATE(SUM('HoursReports'[Hours Worked]),

FILTER(

ALL('HoursReports'),

'HoursReports'[Year] = EARLIER('HoursReports'[Year]) &&

'HoursReports'[Week No] = EARLIER('HoursReports'[Week No]) &&

'HoursReports'[WorkerID] = EARLIER('HoursReports'[WorkerID])

 

Am I doing something wrong, or is there an easier way of doing this?

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

@pauljohnson Wouldn't you just put those three colums in the Axis and drill into it?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler i need the weekly total as i need to drill down on the is column and cretae further measures on it, worker more than ?? hrs less then ??hrs for instance.

@pauljohnson Hard to go farther on this without sample data I can copy and paste and what you are looking for in terms of output.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.