Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
hi everybody
I have three tables, one of them is dimensional (id and names of my employees) and it has unique values. The others are fact tables, with diffenrent values (hours in differents sections or activities). I want to calculate total number of employees and I had some duplicated value because some people work in more than one activity. So, the measure shows more employees that I really have. Any idea about how to calculate this properly?
Thank you in advance.
Solved! Go to Solution.
Hi @RaulPBI,
I think you need to create a mapping table to store mapping records and used to convert different id.
Sample:
Index | Table1 ID | Table2 ID |
1 | 123 | abc |
2 | 456 | def |
Regards,
Xiaoxin Sheng
What measure are you currently using? Would CALCULATE(DISTINCTCOUNT... solve your issue?
I'm afraid no. More details?
What measure are you currently using?
I use "distinctcount" to count different values (worker´s number) in both fact tables, but the issue is that one single value can appear in both tables. So, how do you do to consider this repeated value as one value?
What I mean is that I have the workers in tables "horasproduccionnaves" and "tablahoras1", but they are unique workers. I want to calculate "number of workers". Any help?
HI @RaulPBI,
Maybe you can try to use UNION function to merge these tables and use COUNTROWS function to get the count.
Sample:
Count workers = COUNTROWS ( DISTINCT ( UNION ( ALLSELECTED ( Table1[ID] ), ALLSELECTED ( Table2[ID] ) ) ) )
Regards,
Xiaoxin Sheng
That is no work because the tables have not the same columns.
Hi @RaulPBI,
I think you need to create a mapping table to store mapping records and used to convert different id.
Sample:
Index | Table1 ID | Table2 ID |
1 | 123 | abc |
2 | 456 | def |
Regards,
Xiaoxin Sheng
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.