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.
Thanks for Quick Response.
But Facing Count issue only record E we are getting, we need E,BB FF record in ours output.
we are looking for below output :
EMP ID | EMP NAME | Age | Amt | Un-Matched Values |
|
5 | E | 4 | 2333 | #N/A | E |
12 | BB | 13 | 45 | #N/A | BB |
15 | FF | 11 | 2 | #N/A | FF |
Please can you help on this .
Thanks & Regards,
Rakesh Jadhav
Hi Rakesk13,
I can see that you have created a calculated column and not a measure, try creating a measure and then test the values
- Rakesk132 months agoHelper III
Hi,
I have created Measure but getting below error :
Please can you help out on this.
Thanks & Regards,
Rakesh Jadhav
- v-kpoloju-msft2 months agoCommunity Support
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.
- v-kpoloju-msft2 months agoCommunity Support
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.