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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Cross-Sell Analysis | CALCULATE for specific customer

Hi all,

 

I'm a PowerBI newbie and sitting here in front of my laptop, struggling to find the right way aggregating my data. I hope that maybe you can help me, that would be awesome.

 

My goal is to make a cross-sell analysis. In order to show you my problem I created the example table you can see below.

Problem 1: What is missing until now, is the column "Sum by customer" which I need to create with a DAX-formula, but I don't know how. The idea of the formula "Sum by customer" explained by the second row for customer A with a sum of 2: the formula should sum all values in the columns "Product 1" - "Product 5" for customer A in all rows where the customer is A (here it is: 1 + (-1) + 1 +1 = 2). How is this formula going to look like?

 

Customer  Product 1  Product 2 Product 3  Product 4  Product 5  Sum by contract  Sum by customer  

A

1    12
B 1   10
C   1 11
A-1    -12
A  1  12
B -1   -10
A    112

 

Problem 2: Having my table above, I need a measure which gives me back the number of customers which have a value in "Sum by customer" equal or greater than 2. For this example the formula should give me back a value of 1, with "A" being the only customer with >= 2 contracts.

 

Help from you, and if it's only for either for one of the problems, would be highly appreciated! Thanks in advance 😊

 

Felix

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

please see the attachement.Hope this is helpful.





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

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@Anonymous 

please see the attachement.Hope this is helpful.





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

Proud to be a Super User!




amitchandak
Super User
Super User
Anonymous
Not applicable

@amitchandak  Thank you for the links!

 

To be honest, at this point they don't help me that much. It would be great if someone is able to explain it by using my example above?

 

Regards,

Felix

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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