I need to write a measure that gives me the distinct count of items in one table that do not appear in another table.
Table1 appears as follows:
ID
1001
1002
1003
1004
Table2 appears as follows:
ID
1001
1002
1004
1001
1002
I want to write a measure that returns a result of 1 because ID 1003 in Table1 does not appear in Table2.
Any and all help would be greatly appreciated.
Solved! Go to Solution.
@Anonymous
Also you can use this MEASURE
Measure = COUNTROWS ( EXCEPT ( VALUES ( Table1[ID] ), VALUES ( Table2[ID] ) ) )
@Anonymous
Also you can use this MEASURE
Measure = COUNTROWS ( EXCEPT ( VALUES ( Table1[ID] ), VALUES ( Table2[ID] ) ) )
You could do this in 2 steps:
IsInTable2 = LOOKUPVALUE(Table2[ID],Table1[ID],Table1[ID])You can hide this column as it only stores an intermediate result.
NotInTable2 = COUNTBLANK(Table1[IsInTable2])
Hope this helps
JJ
Thanks for the suggestion. I appreciate you taking the time to submit it.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.
Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!
User | Count |
---|---|
346 | |
100 | |
62 | |
51 | |
47 |
User | Count |
---|---|
333 | |
124 | |
86 | |
66 | |
65 |