Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
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 | 1 | 2 | ||||
B | 1 | 1 | 0 | ||||
C | 1 | 1 | 1 | ||||
A | -1 | -1 | 2 | ||||
A | 1 | 1 | 2 | ||||
B | -1 | -1 | 0 | ||||
A | 1 | 1 | 2 |
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
Solved! Go to Solution.
@Anonymous
please see the attachement.Hope this is helpful.
Proud to be a Super User!
@Anonymous , refer if Market Basket Analysis can help you
https://finance-bi.com/power-bi-basket-analysis/
https://businessintelligist.com/2017/03/27/market-basket-analysis-using-power-bi/
https://www.daxpatterns.com/usecases/market-basket-analysis/
https://www.mssqltips.com/sqlservertip/5428/market-basket-analysis-in-r-and-power-bi/
@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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
85 | |
65 | |
51 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |