Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I am trying to analyse all the sourcing projects. We have 10 different columns for each Vendor and its price. I want to have a measure which shows me distinct count of all the vendors combined. Same vendors could appear in multiple columns due to multiple projects. Please see below the type of data I have.
So the result should be, 15 distinct Vendors for below example. Any suggestions?
Thanks.
Project No. | Vendor 1 | Vendor 1 price | Vendor 2 | Vendor 2 price | Vendor 3 | Vendor 3 price |
1 | ABC | 97 | LMN | 66 | DEF | 15 |
2 | XYZ | 24 | ABC | 57 | FLS | 95 |
3 | PQRS | 26 | STO | 66 | JWB | 79 |
4 | LMN | 65 | FRA | 90 | FSV | 39 |
5 | DEF | 64 | GFR | 55 | ABC | 40 |
6 | HIJ | 80 | PQRS | 60 | LWC | 72 |
7 | ZAC | 46 | DEF | 61 | PQRS | 28 |
Solved! Go to Solution.
May be a MEASURE like
Measure = COUNTROWS ( DISTINCT ( UNION ( VALUES ( TableName[Vendor 1] ), VALUES ( TableName[Vendor 2] ), VALUES ( TableName[Vendor 3] ) ) ) )
please try below
= DISTINCTCOUNT(Vendor1) + DISTINCTCOUNT(Vendor2) + DISTINCTCOUNT(Vendor3)
I had tried already, but it adds up the distinct count. In the given example, the final value still shows 21.
May be a MEASURE like
Measure = COUNTROWS ( DISTINCT ( UNION ( VALUES ( TableName[Vendor 1] ), VALUES ( TableName[Vendor 2] ), VALUES ( TableName[Vendor 3] ) ) ) )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
51 | |
42 | |
40 |