The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello.
I have two tables. One with clients. One with sales.
I want to create 3 columns in my clients table.
First column: Name of the product in which they spent the most money.
Second column: Name of the product in second place.
Third column: Name of the product in third place.
To clarify: I need the results to show the product in which the client spent the most money overall. So, for example, if a client spent 20€ on boots and 50€ on 10 t-shirts, it should say t-shirt, even tho boots are more expensive than t-shirts.
Besides that, I need to filter the sales table since I don't want all transactions to be considered. Let's say I want to filter by ProductCategory.
ClientID | Name | LastName |
1 | John | Johnson |
2 | Mary | Smith |
3 | Peter | Miller |
TransactionID | ClientID | ProductName | SalesValue | ProductCategory |
1 | 2 | Shirt | 5 | A |
2 | 1 | Sweater | 15 | C |
3 | 3 | Shirt | 5 | A |
4 | 3 | Pants | 10 | D |
5 | 2 | Socks | 1 | D |
6 | 1 | Boots | 20 | E |
7 | 1 | Shirt | 5 | A |
8 | 2 | Boots | 20 | E |
9 | 2 | Sweater | 15 | C |
Thank you in advance.
Not quite the solution I want. I explain in more detail what I'm looking for in this topic since the other one is marked as resolved.
Hi @PDRTXRA ,
This issue has already been solved in another community question .Please check out the below link :-
https://community.powerbi.com/t5/Desktop/Finding-Best-Product-per-Client/m-p/3032208
Thanks ,
Pratyasha Samal
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
80 | |
73 | |
52 | |
50 |
User | Count |
---|---|
129 | |
123 | |
78 | |
64 | |
60 |