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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi all,
I am using direct query and have this problem:
I want to count the useres which are not active since three months. Because of that I've created a measure which claculates the diffrence between today and the last active day for the users, so 1 for not active , 0 for active .
Is inactive user since 90 days = IF( DATEDIFF(MAX('table'[TimestampUtc]);NOW();DAY)>90;1;0)
It works well !
But when I need to create other measue which calculates the the count like this, I get this error:
count of inactive users = CALCULATE(DISTINCTCOUNT('table'[UserId]);[Is inaktiver Nutzer seit 90 Tagen]=1)
I have read that, this formula is not supported in direct query, so I went another way with a table like this but it doesn't count the number of 1 ( it seems it shows the average):
What should I do !!
Thanks for Help 🙂
Taher
Solved! Go to Solution.
Give this a shot
count of inactive users =
CALCULATE (
DISTINCTCOUNT ( 'table'[UserId] ),
FILTER (
ALLSELECTED ( 'table'[UserId] ),
[Is inaktiver Nutzer seit 90 Tagen] = 1
)
)
Give this a shot
count of inactive users =
CALCULATE (
DISTINCTCOUNT ( 'table'[UserId] ),
FILTER (
ALLSELECTED ( 'table'[UserId] ),
[Is inaktiver Nutzer seit 90 Tagen] = 1
)
)
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 57 | |
| 55 | |
| 42 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 113 | |
| 106 | |
| 38 | |
| 35 | |
| 26 |