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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
JoeyI
Regular Visitor

Sum for categories in adjacent column

Hi,

How can i get the sum duration for each Id on the different date and shifts?

 

Thanks
Capture.PNG

 

 

9 REPLIES 9
Anonymous
Not applicable

SUMMARIZE(Table_Shifts , ROLLUP( [shift date], [shift type],[I'd]) , "Duration", SUM(Table_Shifts[Duration])  )

Hello @Anonymous , what am i missing?

 

Capture.PNG

Hi @JoeyI 

As suggested by az38, please add columns in a matrix.

Capture5.JPGCapture6.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-juanli-msft  ,

 

What i wanted to do was get them by Date/shift and use the resulting values in a measure.

 

 

Hi @JoeyI 

Do you try to add columns to a matrix as above?

Is there any problem?

 

Best Regards

Maggie

Hello @v-juanli-msft ,

I have added a matrix on the report as you asked.

 

But i dont require it on my report. wanted to apply a measure on it before reporting the resulting figures

az38
Community Champion
Community Champion

Hi @JoeyI 

if I understand you correct

Measure = CALCULATE(SUM(Table[Duration], ALLEXCEPT(Table, Table[Id], Table[Shift Date]) )

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
JoeyI
Regular Visitor

Hello @az38 , thanks for the feedback.

 

How do i get it in a table like this?

 

Capture.PNG

az38
Community Champion
Community Champion

@JoeyI 

the easiest way is to create a matrix visual, add Date and Shift as rows, Shift Time as columns, Duration as Values (check if it is aggregated as Sum)

then in matrix settings set Row headers - Stepped Layout = Off, then Row subtotals = Off


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

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.

Top Solution Authors
Top Kudoed Authors