Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Count the user_id's present in one table and are not present in the another table

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.

1 ACCEPTED SOLUTION
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

If I understand you correctly, the formula below should work in your scenario? Smiley Happy

user_count =
COUNTROWS (
    FILTER (
        'public accounts_user';
        CONTAINS (
            'public accounts_user_tags';
            'public accounts_user_tags'[user_id]; 'public accounts_user'[id]
        )
            = FALSE ()
    )
)

 

Regards

View solution in original post

2 REPLIES 2
v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

If I understand you correctly, the formula below should work in your scenario? Smiley Happy

user_count =
COUNTROWS (
    FILTER (
        'public accounts_user';
        CONTAINS (
            'public accounts_user_tags';
            'public accounts_user_tags'[user_id]; 'public accounts_user'[id]
        )
            = FALSE ()
    )
)

 

Regards

Anonymous
Not applicable

Got it, thanks mate @v-ljerr-msft 🙂

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.