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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
jelibier
Frequent Visitor

How to use Measure to filter a table based on another table

Hi, I would like to filter information using a measure not creating another column.

Basically I have two tables (Table 1 – All Users & Table 2 – Users Last Logon(Last 3 months)) Table 1 has no duplicates and Table 2 has duplicates. the only thing these two tables have in common is the Username column. I created a measure to see how many of these users in the past 3 months were active(

Total Active Users =

DISTINCTCOUNT('Table2 - User Last Logon'[User Name]) - CALCULATE(

    DISTINCTCOUNT('Table2 - User Last Logon'[User Name]),

    ISBLANK('Table1 - All Users'[Username])

)

 ). Once I create a table dashboard with Username column & Total Active Users, I see all the username of the users who were active in the past 3 months. I can’t seem to create the opposite of this view. So that I can see all inactive users so I know which users I can remove.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jelibier , Assume Table 2 and Table 1 joined

 

active = DISTINCTCOUNT('Table2 - User Last Logon'[User Name])

 

Inactive = countx(values('Table 1' [User Name]) , if(isblank([Active]), 'Table 1' [User Name], blank()) )

 

Same logic as

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@jelibier , Assume Table 2 and Table 1 joined

 

active = DISTINCTCOUNT('Table2 - User Last Logon'[User Name])

 

Inactive = countx(values('Table 1' [User Name]) , if(isblank([Active]), 'Table 1' [User Name], blank()) )

 

Same logic as

Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/b...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.