Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi everyone, I hope you can help me with this
I have a table that contains the information of the sellers with the products for which they are controlled
Table_control
| cod_product | cod_vendor |
| 1 | 405 |
| 2 | 405 |
| 1 | 123 |
| 1 | 234 |
| 2 | 678 |
| 3 | 678 |
And another table that indicates the daily sales made by sellers.
Table_daily
| cod_product | cod_vendor | cod_client |
| 1 | 405 | 12 |
| 1 | 123 | 78 |
| 3 | 405 | 23 |
| 2 | 405 | 12 |
| 2 | 405 | 32 |
| 2 | 123 | 45 |
| 1 | 678 | 67 |
| 2 | 678 | 89 |
| 3 | 678 | 67 |
I need to count the number of clients they visit based only on the products for which they are controlled
In this example the expected results would be the following:
| cod_vendor | # clients |
| 405 | 2 |
| 123 | 1 |
| 678 | 2 |
Solved! Go to Solution.
You need to add unique key column in both table which can be done using by concatenating vendor & product
so add column in both table like this:
Key = Control[cod_vendor] & Control[cod_product]
set relationship on this key betweem both tables
use table visual and drop, vendor from control table and cod_client from daily table, press arrow next to cod_client field in value deck, and choose distinct count
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
You need to add unique key column in both table which can be done using by concatenating vendor & product
so add column in both table like this:
Key = Control[cod_vendor] & Control[cod_product]
set relationship on this key betweem both tables
use table visual and drop, vendor from control table and cod_client from daily table, press arrow next to cod_client field in value deck, and choose distinct count
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
although based on your sample data, yo will not receive any thing from 678 since it is not in control table.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.