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
ThomasWeppler
Skilled Sharer
Skilled Sharer

Sum of subcategories in same table

Hi 

 

I am looking to summerise the estimated worktime from diffrent assignments. My problem is that the time is registrede on a mixture of the main assignment and serval sub assignments. See example.

example.png

I can find the "Estimate" with the sum( function and the "Sub assignment estimate" by useing the "subassignment" number from the data set instead of "assignment" in the result table. But this solution doesn't allow me to add the data to the same table.

 

Does anyone know a function I can use to have both these numbers in the same table?

1 ACCEPTED SOLUTION
v-yuaj-msft
Community Support
Community Support

Hi @ThomasWeppler ,

 

Based on your description, I think you can create a calculated table as follows.

Result =
VAR x1 =
SUMMARIZE (
'Data',
Data[Assignment],
'Data'[Estimate],
"Sub assignment estimate",
SUMX (
FILTER ( ALL ( Data ), [Sub assignment] = EARLIER ( Data[Assignment] ) ),
[Estimate]
)
)
RETURN
FILTER (
ADDCOLUMNS ( x1, "total estimate", [Estimate] + [Sub assignment estimate] ),
[Sub assignment estimate] <> BLANK ()
)

Result:

v-yuaj-msft_0-1611815175904.png

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

2 REPLIES 2
v-yuaj-msft
Community Support
Community Support

Hi @ThomasWeppler ,

 

Based on your description, I think you can create a calculated table as follows.

Result =
VAR x1 =
SUMMARIZE (
'Data',
Data[Assignment],
'Data'[Estimate],
"Sub assignment estimate",
SUMX (
FILTER ( ALL ( Data ), [Sub assignment] = EARLIER ( Data[Assignment] ) ),
[Estimate]
)
)
RETURN
FILTER (
ADDCOLUMNS ( x1, "total estimate", [Estimate] + [Sub assignment estimate] ),
[Sub assignment estimate] <> BLANK ()
)

Result:

v-yuaj-msft_0-1611815175904.png

Hope that's what you were looking for.

Best Regards,

Yuna

 

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

BA_Pete
Super User
Super User

Hi @ThomasWeppler ,

 

Can you provide an example of wht you want your desired output to look like please? I'm struggling to visualise your requirements.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




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.