Forum Discussion
How to get Count from two different table- Un-match Count Table Record with New Table
- 2 months ago
Hi Rakesk13,
Thank you for the screenshot and follow-up question.The error occurs because the DAX was converted into a measure. Measures do not have row context, so Power BI cannot determine a single EMP ID value and returns the "A single value for column cannot be determined" error.
In this scenario, use a calculated column instead of a measure. Create a column that first identifies unmatched EMP IDs and then uses LOOKUPVALUE (or RELATED if a relationship exists) to return the matching EMP NAME from EMP_ADD. After that, filter the visual to show only rows where the returned value is not blank. This will return the expected records E, BB, and FF.Create this column in Sheet1 (2):
Matched_Name = VAR IsUnmatched = NOT ( 'Sheet1 (2)'[EMP ID] IN VALUES ( 'EMP Details'[EMP ID_DE] ) ) RETURN IF ( IsUnmatched, LOOKUPVALUE ( EMP_ADD[EMP NAME], EMP_ADD[EMP NAME], 'Sheet1 (2)'[EMP NAME] ), BLANK() )Then add:
Show_Record = IF ( NOT ISBLANK ( 'Sheet1 (2)'[Matched_Name] ), 1, 0 )Filter the visual:
Show_Record = 1Hope this helps. If you have any questions regarding this, please feel free to reach out us. We will be happy to help.
Hi Rakesk13,
Just checking in to see if the issue has been resolved on your end. If the earlier suggestions helped, that’s great to hear! And if you’re still facing challenges, feel free to share more details happy to assist further.
Thank you.
Hi Rakesk13,
Just wanted to follow up. If the shared guidance worked for you, that’s wonderful hopefully it also helps others looking for similar answers. If there’s anything else you'd like to explore or clarify, don’t hesitate to reach out.
Thank you.