Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
I've got 2 tables with same field "Id_User"
I'd like to count number of values in my Table2 which are in my Table1
With the example behind, the measure must display : 3 Id 1501, 2 Id 1502, 2 Id 1503 and 1 Id 1504
Thanks for your help.
| Id_User Table 1 | Id_User Table 2 |
| 1501 | 1501 |
| 1502 | 1501 |
| 1503 | 1501 |
| 1504 | 1502 |
| 1502 | |
| 1503 | |
| 1503 | |
| 1504 |
Solved! Go to Solution.
Create a relationship between the 2 tables in the model view.
Use the UserId column Table 1 is the one side, and Table2 is the many side.
Create a count measure in table2 - UserCount = COUNT( 'Table2'[UserId])
Please measure and UserId in a table visual or bar chart
Create a relationship between the 2 tables in the model view.
Use the UserId column Table 1 is the one side, and Table2 is the many side.
Create a count measure in table2 - UserCount = COUNT( 'Table2'[UserId])
Please measure and UserId in a table visual or bar chart
Thanks for your answer.
It seems ok but i've got a wrong result.
I forgot to apply a condition.
The count must integrate that value of field "Option" must be "1" in my Table1.
I tried to apply a filter in the formula but it doesn't match.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 50 | |
| 44 | |
| 42 | |
| 19 | |
| 19 |
| User | Count |
|---|---|
| 70 | |
| 68 | |
| 33 | |
| 32 | |
| 32 |