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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
omusekamp
Regular Visitor

SumProduct DAX Formula needed

Hi!

I need help translating my SUMPRODUCT formula in Excel to DAX. This is a Tiered and Fractionated Sales Commission problem that I have solved in Excel, but have unsuccessfully translated into DAX.

Spread Sheet:

https://drive.google.com/file/d/1dyhb-lRqsktowTvm0vD4fIC_zPE9B5Hn/view?usp=sharing

 

Here's my attempt at recreating the formula in DAX, but you can see the 15% rate bucket is not correct:

Screen Shot 2021-02-17 at 12.44.18 PM.png

 

Here's the Excel Code:

=SUMPRODUCT((J3<=$E$17:$E$23)*(J3>$D$17:$D$23)*(J3-$D$17:$D$23)*$F$17:$F$23)+SUMPRODUCT(((J3>$E$17:$E$23)*($E$17:$E$23-$D$17:$D$23))*$F$17:$F$23)

 

DAX Code Attempt:

Recruiter Commission =
SUMX(Crelate_Export,(([Recruiter YTD Revenue] <= [Total End]) * ([Recruiter YTD Revenue] > [Total Start]) * ([Recruiter YTD Revenue] - [Total Start]) * [Total Rate Percetage])
+ SUMX(Crelate_Export, ((([Recruiter YTD Revenue] > [Total End]) * ([Total End] - [Total Start])) * [Total Rate Percetage])))

 

Some more information:

1) Commissions Rate Table & Crelate Export Table is joined by the 'Bucket Code' key

2) The 'Recruiter YTD Revenue' is a calculated DAX measure in the 'Crelate Export' Table

3) I had to convert the 'Commissions Table' Columns to SUM Measures to be able to use them in the SUMX formula.

ex. 'End' to 'Total End' -- is this correct??

 

Screen Shot 2021-02-17 at 12.48.19 PM.png

 

 

2 REPLIES 2
Anonymous
Not applicable

"DAX that is not formatted correctly is not DAX." - Alberto Ferrari. Please use www.daxformatter.com to format your code in the right way.

Thanks for the reference! And yep, still learning and climbing up the Power BI learning curve, I'll get this code properly formatted. 

Appreciate your feeback!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.