Forum Discussion
How to get count from two different table
- 3 months ago
Here is one way to do this...
Measure = var _distDet = DISTINCT(EMP_Details[EMP ID ]) //unique Details Ids var _distSumm = DISTINCT(EMP_Summ[EMP ID]) //unique Summary Ids var _commonIDs = INTERSECT(_distDet, _distSumm) //unique Ids found in both tables var _unqDet = COUNTROWS(_distDet) - COUNTROWS(_commonIDs) //count of unique Details Ids not in common table var _unqSumm = COUNTROWS(_distSumm) - COUNTROWS(_commonIDs) //count of unique Summary Ids not in common table RETURN _unqDet + _unqSumm
Hi Rakesk13 , Can you explain what you meant by this logic
I need to Count Emp Detail + Emp Summ i.e 8 + 5 = 13
8 corresponds to distinct values of emp id in details table ? or distinct values of emp id in details that is not in summary ?
if you can explain the logic with the sample data it will be great
Thanks!
Natarajan Manivasagan
If you found this helpful, please consider giving it a Kudos and marking it as the accepted solution โ it goes a long way in helping others facing the same issue.
๐ Best Solution for Enterprise BI โ 2026 Microsoft Fabric Semantic Link Developer Experience Challenge
๐ Microsoft announcement ยท View the winning notebook
For more Power BI tips and discussions, let's connect on LinkedIn.
Cheers!