cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
powerbi_9
Frequent Visitor

Create dax measure based on excel sumproduct

Hi, 

 

I am trying to create a dax measure for the sample data attached. I could create drops based on the drop column but running into issue with the dax measure calcualtion for customers shown in the outcome. 

 

Appreciate any help on this.

 

Excel Formula:

Drops - =SUMPRODUCT(($E$2:$E$31)*($B$2:$B$31 = $H3)*($D$2:$D$31 = J$2))

 

Customers - =SUMPRODUCT(($E$2:$E$31)*($B$2:$B$31 = $H4)*($D$2:$D$31 >= J$2))+SUMPRODUCT(($E$2:$E$31)*($B$2:$B$31 = $H4)*($C$2:$C$31 >= J$2)*($C$2:$C$31 > 0))

 

Thank you

Sample DataSample DataOutcomeOutcome

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @powerbi_9,

 

If I understand your requirement correctly that you want to create the dax measure for Drops and Customers to get the outcome. 

 

For your scenario, if you want to get the outcome you share, I'm afraid you should create the column Drops and Customers in Excel or create the custom columns in Power Query Editor.

 

Then you could unpivot the columns Drops and Customers  in Power Query Editor and you will get the outcome in Power BI.

 

Dax may not achieve your requirement.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.