cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

SUMIFS in Power BI?

I have the following query:

 

Gross Savings = SUMX(FILTER(AggregateSPCost,AggregateSPCost[Savings Plan Cost]>'Savings Plan Commitment'[Savings Plan Commitment Value]),('Savings Plan Commitment'[Savings Plan Commitment Value]/(1-0.395))- 'Savings Plan Commitment'[Savings Plan Commitment Value])
 
However, I would like to add another logic to the query (highlighted in red):
 
Gross Savings = SUMX(FILTER(AggregateSPCost,AggregateSPCost[Savings Plan Cost]>'Savings Plan Commitment'[Savings Plan Commitment Value]),('Savings Plan Commitment'[Savings Plan Commitment Value]/(1-0.395))- 'Savings Plan Commitment'[Savings Plan Commitment Value],ELSE AggregateSPCost[Savings Plan Cost]
 
Is there a way to add an ELSE statement to the SUMX query?? Or should I do a different query overall? Basically, I am hoping to find the DAX equivalent of SUMIF.
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

@atinakarim , You can do it, if there are from one table, so one from another table will not work

Gross Savings = SUMX(AggregateSPCost, IF (AggregateSPCost[Savings Plan Cost]>'Savings Plan Commitment'[Savings Plan Commitment Value],('Savings Plan Commitment'[Savings Plan Commitment Value]/(1-0.395))- 'Savings Plan Commitment'[Savings Plan Commitment Value], AggregateSPCost[Savings Plan Cost]))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

1 REPLY 1
Highlighted
Super User IV
Super User IV

@atinakarim , You can do it, if there are from one table, so one from another table will not work

Gross Savings = SUMX(AggregateSPCost, IF (AggregateSPCost[Savings Plan Cost]>'Savings Plan Commitment'[Savings Plan Commitment Value],('Savings Plan Commitment'[Savings Plan Commitment Value]/(1-0.395))- 'Savings Plan Commitment'[Savings Plan Commitment Value], AggregateSPCost[Savings Plan Cost]))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors