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
Jayfemi
Helper I
Helper I

SUMIF Equivalent in DAX

Hi, 

I am inthe process of moving reports from excel onto power Bi and i am having some problems finding the DAX alternative so some common formulas i use.

 

For example i am usiing this sum ifs =SUMIFS(Allocated,Month,F$8,Workflow,"Reactive on DRS")  

1 ACCEPTED SOLUTION
v-ljerr-msft
Employee
Employee

Hi @Jayfemi,


For example i am usiing this sum ifs =SUMIFS(Allocated,Month,F$8,Workflow,"Reactive on DRS")  


Based on my test, the formula below should work in your scenario.

Sum Of Allocated = CALCULATE(SUM(Data[Allocated]),Data[Workflow]="Reactive on DRS")

r1.PNG

Here is the sample pbix file for your reference. Smiley Happy

 

Regards

View solution in original post

8 REPLIES 8
v-ljerr-msft
Employee
Employee

Hi @Jayfemi,


For example i am usiing this sum ifs =SUMIFS(Allocated,Month,F$8,Workflow,"Reactive on DRS")  


Based on my test, the formula below should work in your scenario.

Sum Of Allocated = CALCULATE(SUM(Data[Allocated]),Data[Workflow]="Reactive on DRS")

r1.PNG

Here is the sample pbix file for your reference. Smiley Happy

 

Regards

MFelix
Super User
Super User

Hi @Jayfemi,

Just use the CALCULATE function something like this

CALCULATE( SUM(Table[Allocated]), Table[Month]= Calendar[Month], Table[Workflow]="Reactive on DRS")

Don't know you're exact model but it will be sonething like the above where the first argument is the summarization you want the rest are the filter you want to make.

Regards,
MFelix

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



TomMartens
Super User
Super User

Hey,

 

basically you can use this pattern

SUMX('your table'
  ,if('yourtable'[columnyousearchin] = "yoursearchvalue" 
    ,calculate(SUM('yourtable'[column you want to sum]))
    ,BLANK()
)

 

Hope this gets you started



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
hemantsingh
Helper V
Helper V

Hi @Jayfemi,

 

    It would be great if you have shared some sample data or the result you are trying to achieve. I still believe "calculate wrapped in if " would do what you want.

 

Regards,

Hemant

Hi @hemantsingh 

 

please see sample data ideally i am trying to recreate the charts on the tab Vital statistics in Bi

Hi @Jayfemi,


please see sample data ideally i am trying to recreate the charts on the tab Vital statistics in Bi


Where is your sample data? I can't find it anywhere. Smiley Happy

 

Regards

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.