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
BartVanH
Frequent Visitor

SUM of values for identical entries in another column/table

Hi, please help me figure out this one.

 

I have two tables with some Service Desk Data.

There's is a working relationship between the two, I don't suspect any issues there.

 

Tables.jpg

 

For each Ticket I know how much Time was spent.

Now I would like to know how much Time was spent for each Customer.

 

(I guess a Measure is recommended, so I'm not putting my desired results in a table to show you)

So the data I would need:

Cust1: 40

Cust2: 60

Cust3: 170

 

I have several hundred Customers, so any formula containing a specific value (FILTER ..... 'Cust1') is not applicable.

 

Thanks!

 

 

 

 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @BartVanH,

 

If you have solved your problem, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, you also could create the calculated column or the measure with the formula below for Table2.

 

Measure = CALCULATE(SUM(Table1[Time Spent]),FILTER('Table1','Table1'[Customer ID]=MAX('Table1'[Customer ID])))

Column = CALCULATE(SUM(Table1[Time Spent]),FILTER('Table1','Table1'[Customer ID]=EARLIER('Table2'[Customer ID])))

sum.PNG

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
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

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @BartVanH,

 

If you have solved your problem, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

If you still need help, you also could create the calculated column or the measure with the formula below for Table2.

 

Measure = CALCULATE(SUM(Table1[Time Spent]),FILTER('Table1','Table1'[Customer ID]=MAX('Table1'[Customer ID])))

Column = CALCULATE(SUM(Table1[Time Spent]),FILTER('Table1','Table1'[Customer ID]=EARLIER('Table2'[Customer ID])))

sum.PNG

 

Best  Regards,

Cherry

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

Thanks for the help!

 

I was still looking into this.

 

The first proposed solution works, but only on a visual level.

I actually need to perform more calculations ont the result from filtering Time Spent by Customer, so I would indeed need a measure and/or column.

The second solution seems awesome.

In the meantime, I've been in contact with our ITSM tool admins to actually already perform some of the calculations in the tool. The more I look at it, the more it looks like Power BI is not suited for some of the things I need, like keeping track of certain values across multiple time periods... (and which are not supposed to be done in a reporting tool)

 

I'll close this question and come back if I get stuck further down the line 🙂

Stachu
Community Champion
Community Champion

this will work, you just need to drag the Customer Name and measure in a single visual

Measure = SUM(Table1[Time Spent])

you can put it in any of the tables, model will take care of propagating filters properly



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

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.