Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I’m hoping for some help with a DAX. I’m trying to achieve the functionality of multiple SUMIFs in Excel and have searched the community to see if I could figure it out. Clearly, I’m missing something as I’ve not been successful as of yet. I’ve pasted a sample of my table below:
Table Name: ADMIN
| Date | Activity Type | Time | 
| 11-Sep-2023 | Indirect Care Time | 1.00 | 
| 12-Sep-2023 | Rx Renewal Time | 7.50 | 
| 12-Sep-2023 | PFHT Activity Time | 1.00 | 
| 13-Sep-2023 | Rx Renewal Time | 0.50 | 
| 13-Sep-2023 | PFHT Activity Time | 0.50 | 
| 13-Sep-2023 | No Show Cancel Time | 1.00 | 
| 14-Sep-2023 | No Show Cancel Time | 0.25 | 
| 14-Sep-2023 | PFHT Activity Time | 0.50 | 
| 15-Sep-2023 | Indirect Care Time | 0.50 | 
| 15-Sep-2023 | PFHT Activity Time | 0.50 | 
| 18-Sep-2023 | Indirect Care Time | 0.50 | 
| 18-Sep-2023 | Rx Renewal Time | 1.00 | 
| 19-Sep-2023 | No Show Cancel Time | 0.50 | 
| 19-Sep-2023 | Secure Message Time | 1.50 | 
| 20-Sep-2023 | Rx Renewal Time | 1.50 | 
| 20-Sep-2023 | Program Develop Time | 1.00 | 
I would like a DAX that sums time recorded in the Time column for the following Activity Types:
In my sample data above, this would equate to 15.75.
In Excel, I would have used: =SUMIF(B:B,"Indirect Care Time",C:C)+SUMIF(B:B,"No Show Cancel Time",C:C)+SUMIF(B:B,"Rx Renewal Time",C:C)+SUMIF(B:B,"Secure Message Time",C:C) where column B Activity Type and column C is Time.
I’ve tried several variations of the DAX below but keep receiving errors so I’m doing something wrong.
Indirect Service Hours =
CALCULATE(
SUM(FILTER('ADMIN','ADMIN'[Activity Type]="Indirect Care Time"),'ADMIN'[Time])
,(FILTER('ADMIN','ADMIN'[Activity Type]="No Show Cancel Time"),'ADMIN'[Time])
,(FILTER('ADMIN','ADMIN'[Activity Type]="Rx Renewal Time"),'ADMIN'[Time])
,(FILTER('ADMIN','ADMIN'[Activity Type]="Secure Message Time"),'ADMIN'[Time])
)
Solved! Go to Solution.
@ahiemstra 
Try this measure:
Indirect Service Hours =
CALCULATE (
    SUM ( 'ADMIN'[Time] ),
    'ADMIN'[Activity Type]
        IN {
            "Indirect Care Time",
            "No Show Cancel Time",
            "Rx Renewal Time",
            "Secure Message Time"
        }
)
⭕  Subscribe and learn Power BI from these videos
 ⚪ Website ⚪  LinkedIn ⚪  PBI User Group 
@ahiemstra 
Try this measure:
Indirect Service Hours =
CALCULATE (
    SUM ( 'ADMIN'[Time] ),
    'ADMIN'[Activity Type]
        IN {
            "Indirect Care Time",
            "No Show Cancel Time",
            "Rx Renewal Time",
            "Secure Message Time"
        }
)
⭕  Subscribe and learn Power BI from these videos
 ⚪ Website ⚪  LinkedIn ⚪  PBI User Group 
 
					
				
				
			
		
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
 
            | User | Count | 
|---|---|
| 9 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | 
| User | Count | 
|---|---|
| 23 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |