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

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

Reply
Anonymous
Not applicable

SUM of column conditional to many values of another column

Hi,

 

I am trying to accomplish something, but don't know how to do it.

 

I have a Dimension (Table) that represents time entries for employees like so :

 

IdEmployeeIdEntryDTTimeInMinutesPriceAgreementId
112017-03-201001
212017-03-3150null
322017-03-211001
422017-03-231252
532017-03-1590null
632017-03-25601

 

Sometimes they work on "PriceAgreements", and sometimes they don't).

 

In my Dashboard, i have a Table that groups that table by EmployeeId and Sums the TimeInMinutes. I also have a Slicer for EntryDT :

 

EmployeeIdTimeInMinutes
1150
2225
3150

 

I need to create 2 new columns that represent :

  1. The total TimeInMinutes an Employee has worked on all PriceAgreements
    So for EmployeeId #1, the Total would be 100.
  2. The total TimeInMinutes ALL Employees have worked, but only for the PriceAgreements the current Employee (current row) has worked on.

So the Table would look like this (without the PriceAgreementIds in parenthesis) :

 

EmployeeIdTimeInMinutesTimeInMinutes on PriceAgreementsTimeInMinutes on PriceAgreements ALL other EmployeeIds
1150100 (PriceAgreementId=1)260 (PriceAgreementId=1)
2225225 (PriceAgreementId=1 and 2)385 (PriceAgreementId=1 and 2)
3150150 (PriceAgreementId=1)260 (PriceAgreementId=1)

 

Column "TimeInMinutes on PriceAgreements" is quite easy, but the other one, i cannot find a solution...

 

I have this DAX expression I started, but it is not complete:

CALCULATE(SUM(TEntry[EmployeeTimeInMinutes]), NOT ISBLANK(TEntry[PriceAgreementId]), ALL(TEmployee))

 

TEmployee is a Dimension linked to the main Entry Table.

 

Any help would be appreciated.

Thank you.

0 REPLIES 0

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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 Kudoed Authors