Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi everybody,
I am just getting started with PowerBI, and stuck already :). Here is my question:
I have 2 tables.
Table A holds unique IDs:
1
2
3
4
Table B holds the same IDs and Country Names:
1 Belgium
2 Belgium
2 France
2 China
3 France
4 France
4 Belgium
What I would like to do is add a column to Table A providing a sum of the number of distinct countries in which the ID is available. In other words, Table A should become:
1 1
2 3
3 2
4 1
Any ideas on how I can best achieve this?
Thanks so much!
Mark
Solved! Go to Solution.
Hi
Create a relationship between table a and table b on ID's then create a DAX measure
CountryCount = (COUNTROWS(Table2))
Kind Regards
David
Hi
Create a relationship between table a and table b on ID's then create a DAX measure
CountryCount = (COUNTROWS(Table2))
Kind Regards
David
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
88 | |
73 | |
54 | |
43 | |
37 |
User | Count |
---|---|
98 | |
64 | |
54 | |
48 | |
45 |