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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
kekepania0529
Helper I
Helper I

Excel SUMIFS conversion help

I have the following excel formula that I need to convert to DAX for Power BI (Power BI column names are in italics within the excel formula):

 

Area Contract Price = IFERROR(SUMIFS('Contract Details'!$Z:$Z Sell Extended Price,'Contract Details'!$D:$D Area,'Inbound Report'!$H14 Area,'Contract Details'!$L:$L Product Class,'Inbound Report'!$B14 Material Grade)/SUMIFS('Contract Details'!$Y:$Y Sell Order LB,'Contract Details'!$D:$D Area,'Inbound Report'!$H14 Area,'Contract Details'!$L:$L Product Class,'Inbound Report'!$B14 Material Grade),"")

 

Contract Details and Inbound Reports are unrelated tables in my Power BI report. I cannot create a relationship because neither table has a unique identifier (many:many). The join is on Inbound Report.Area = Contract Details.Area and Inbound Report.Material Grade = Contract Details.Product Class.

1 ACCEPTED SOLUTION
kekepania0529
Helper I
Helper I

i was able to get my desired results with this :

Area Contract Pricing = AVERAGEX(FILTER( 'Contract Detail','Contract Detail'[Area] = 'Inbound Detail'[Area] &&
          'Contract Detail'[Product Class Desc] = 'Inbound Detail'[Material Grade]), 
          DIVIDE('Contract Detail'[Sell Extended Price], 'Contract Detail'[Sell Ordered LB], 0))

View solution in original post

3 REPLIES 3
kekepania0529
Helper I
Helper I

i was able to get my desired results with this :

Area Contract Pricing = AVERAGEX(FILTER( 'Contract Detail','Contract Detail'[Area] = 'Inbound Detail'[Area] &&
          'Contract Detail'[Product Class Desc] = 'Inbound Detail'[Material Grade]), 
          DIVIDE('Contract Detail'[Sell Extended Price], 'Contract Detail'[Sell Ordered LB], 0))
AlexisOlson
Super User
Super User

SUMIFS is a sum of rows that satisfy the listed matching conditions.

 

In DAX, you can use filters in a similar way. This might work as a calculated column on 'Inbound Report'.

Numerator =
CALCULATE (
    SUM ( 'Contract Details'[Sell Extended Price] ),
    'Contract Details'[Area] = 'Inbound Report'[Area],
    'Contract Details'[Product Class] = 'Inbound Report'[Material Grade]
)

You can replace 'Inbound Report'[Area] and 'Inbound Report'[Material Grade] with specific values for this to work as a measure.

smpa01
Super User
Super User

@kekepania0529 not familiar with SUMIF. Can you provide sample data and expected output.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.