Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi everyone.
I have some troubles trying to calculate active and inactive users. I have the next tables (it's an example)
Table 1
| Phone | Date | Client | 
| 222 | 01/08/19 | A | 
| 222 | 01/02/20 | B | 
| 224 | 01/02/20 | A | 
Table 2
| Phone | ID | |
| 222 | exam.. | 1 | 
| 224 | ex... | 3 | 
| 223 | exam2... | 2 | 
Table 1 is about the transaction and table 2 is about an user database. So I want to know the active users and inactive users by phone. For example in 2019 there was just 1 active user and 2 inactive users.
I have a calendar table. Thank you very much.
Solved! Go to Solution.
Hi @Anonymous ,
We can create a measrue and there is no relationship between date table and table to meet your requirement.
Measure = 
var selected_ = SELECTEDVALUE('Date'[Date])
var date_long = DATEDIFF(MAX('Table'[Date]),TODAY(),MONTH)
var date_long1 = DATEDIFF(selected_,TODAY(),MONTH)
return
IF(date_long>date_long1,"inactive","active")
If it doesn't meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Sorry for that we don’t understand your issue clearly.
What is your desire result? And how to judge if a user is active or inactive?
Could you please provide a mockup sample based on fake data or describe the fields of each tables and the relations between tables simply?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Yes of course.
I have a data base about users, each phone each a user. Each row is a transaction, so I want to know for example who is inactive five months ago.
For example, my last transaction was five months ago, so If I filter it with the calendar 3 months ago I'm an inactive user, on the other hand If I filter it with the calendar 6 months ago I'm an active user. 
What I did was this: 
Operations = countrows(table1)
Status= IF(operations=0,"Inactive","Active")
But It does not work at all. Because It works when I put it on a table but not in a graphic. 
Thank you. 
Hi @Anonymous ,
We can create a measrue and there is no relationship between date table and table to meet your requirement.
Measure = 
var selected_ = SELECTEDVALUE('Date'[Date])
var date_long = DATEDIFF(MAX('Table'[Date]),TODAY(),MONTH)
var date_long1 = DATEDIFF(selected_,TODAY(),MONTH)
return
IF(date_long>date_long1,"inactive","active")
If it doesn't meet your requirement, could you please show the exact expected result based on the table that we have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.