Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am trying create a new column that confirms if a customer has bought product from both distributors. An example data set is below. Most companies only buy from one distributor, however there are some that buy from both. I want to be able to filter out the customers that buy from both distributors (eg. Have a new column called "Buy from both?")
The columns I'm using below are 'Customer'[Customer Name], 'Distributor'[Distributor Name] and 'Key Measures'[Revenue].
These columns also exist in my fact table (called 'Orders'). eg. 'Orders'[Customer Name], 'Orders'[Distributor Name] etc.
I understand that this will most likely involve nested IF AND statements, but I am unable to get it to work!
Does anyone have tips to point me in the right direction?
One way to do this (if you have only two distributors) would be with a measure like this
Both Distributors = IF(DISTINCTCOUNT('Orders'[Distributor Name])>=2, "Y", "N")
That should work in a table visual with the Customer Name column.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thanks Pat
I actually have 4 distributors, however only 2 actually share customers. What modification should I make to the measure?
Hi,
So you want to know how many customers (and which customers) buy from more than 1 distributor. Am i correct? Please share the link from where i can download your PBI file.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
67 | |
51 | |
39 | |
26 |
User | Count |
---|---|
87 | |
54 | |
45 | |
40 | |
36 |