Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
I have two tables:
account_users and accounts_user_tags
connected with account_users.id = accounts_user_tags.user_id
Need a measure to calculate the extra id's present in account_users table but are not present in accounts_user_tags
I tried something like:
user_count = CALCULATE(
COUNT(
'public accounts_user'[id]
);
FILTER('public accounts_user_tags';'public accounts_user_tags'[user_id])
)
but, I guess it's not correct.
Anyone could guide me here.
Solved! Go to Solution.
Hi @Anonymous,
If I understand you correctly, the formula below should work in your scenario?
user_count = COUNTROWS ( FILTER ( 'public accounts_user'; CONTAINS ( 'public accounts_user_tags'; 'public accounts_user_tags'[user_id]; 'public accounts_user'[id] ) = FALSE () ) )
Regards
Hi @Anonymous,
If I understand you correctly, the formula below should work in your scenario?
user_count = COUNTROWS ( FILTER ( 'public accounts_user'; CONTAINS ( 'public accounts_user_tags'; 'public accounts_user_tags'[user_id]; 'public accounts_user'[id] ) = FALSE () ) )
Regards
User | Count |
---|---|
85 | |
73 | |
73 | |
57 | |
51 |
User | Count |
---|---|
44 | |
41 | |
35 | |
34 | |
30 |