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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
ahiemstra
Helper I
Helper I

Multiple SUMIFs Functionality in DAX

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

DateActivity TypeTime
11-Sep-2023Indirect Care Time1.00
12-Sep-2023Rx Renewal Time7.50
12-Sep-2023PFHT Activity Time1.00
13-Sep-2023Rx Renewal Time0.50
13-Sep-2023PFHT Activity Time0.50
13-Sep-2023No Show Cancel Time1.00
14-Sep-2023No Show Cancel Time0.25
14-Sep-2023PFHT Activity Time0.50
15-Sep-2023Indirect Care Time0.50
15-Sep-2023PFHT Activity Time0.50
18-Sep-2023Indirect Care Time0.50
18-Sep-2023Rx Renewal Time1.00
19-Sep-2023No Show Cancel Time0.50
19-Sep-2023Secure Message Time1.50
20-Sep-2023Rx Renewal Time1.50
20-Sep-2023Program Develop Time1.00

 

I would like a DAX that sums time recorded in the Time column for the following Activity Types:

  • Indirect Care Time
  • No Show Cancel Time
  • Rx Renewal Time
  • Secure Message Time

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])

)

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@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"
        }
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

1 REPLY 1
Fowmy
Super User
Super User

@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"
        }
)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.