Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi,
Newbie here. I have encountered difficulties in figuring out how to calculate distinct rows from two columns.
I have two tables(see figure):
I use the "manage relationships" function by "DOA" of the two tables and my final matrix as follows.
My intention is to compute the distinct countrow of the distinct count of DOA and DOD.
Although the distinct count of totals are correct, the column value within the matrix are identical between DATE and DOA.
I expect the Pediatric Ward to have 50 count under DATE instead of 34 after remove duplication of the appending DOA and DOD by excel.
Thank you in advance for your help.
Update with sample data.
The closest I get to work by using the following DAX:
Only two manage to get the right count.
@saver7890 , Based on what I got, check if the approach having a date table and active inactive relation and using userelationship can help
Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Thank you for your attention.
Yes, there is a date table and active relation.
I tried your DAX syntax but the value is still off.
For example, the VIP ward should have 4 distinct counts as the "DOA" and "DOD" have different dates.
Thank you.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 20 | |
| 14 | |
| 13 | |
| 13 |
| User | Count |
|---|---|
| 62 | |
| 40 | |
| 38 | |
| 38 | |
| 38 |