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.
I am trying to find unique values in each tables. So for example get unique id's in table A and do the same for table B. Now I want to make sure when I count these ID's not to count them twice since same ids can be in each table. I know what I need to use base table for this code but cant sedem to understand how to resolve this. Can anyone assist please
DEFINE
VAR A = VALUES('Table A'[ID])
VAR B = VALUES('Table B'[ID])
VAR C = UNION(A,B)
VAR D = DISTINCTCOUNT(C[ID])
EVALUATE
D
Solved! Go to Solution.
hello @stribor45
please check if this accomodate your need.
i made a simple dataset.
based on above dataset, the distinct count should be 11.
i assumed you want to do this in measure, so create a new measure with following DAX.
Hope this will help.
Thank you.
Hi @stribor45 , Thank you for reaching out to the Microsoft Community Forum.
Please let us know if your issue is solved. If it is, consider marking the answers that helped 'Accept as Solution', so others with similar queries can find them easily. If not, please share the details.
Thank you.
This works but how does the outer DISTINCT know that we are talkinjg about ID column? Is it because it is only one column?
hello @stribor45
i might be misunderstood but you can target the value you want to calculate the distinct value.
otherwise, please share your sample dataset and your expected outcome.
Thank you.
hello @stribor45
please check if this accomodate your need.
i made a simple dataset.
based on above dataset, the distinct count should be 11.
i assumed you want to do this in measure, so create a new measure with following DAX.
Hope this will help.
Thank you.
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 |
---|---|
15 | |
11 | |
11 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |