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! Request now
I have a table
I want calculate how many users in interval 25.03.2020 - 30.03.2020 have DateDiff(RefreshDate; ExchangeAct) = 0
Solved! Go to Solution.
Hi,
According to your description, i create a simple sample to test:
Then try this measure:
Measure =
IF (
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Name] IN DISTINCT ( 'Table'[Name] )
&& 'Table'[ExchangeAct] <> 'Table'[RefreshDate]
)
) > 0,
1,
0
)The result shows:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto Zhi
Hi,
According to your description, i create a simple sample to test:
Then try this measure:
Measure =
IF (
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Name] IN DISTINCT ( 'Table'[Name] )
&& 'Table'[ExchangeAct] <> 'Table'[RefreshDate]
)
) > 0,
1,
0
)The result shows:
Here is my test pbix file:
Hope this helps.
Best Regards,
Giotto Zhi
Create a measure
measure =
calculate(distinctcount(Table[Name]),filter(Table,DateDiff(Table[RefreshDate]; Table[ExchangeAct],day) = 0))
or create a column and measure
column = DateDiff(Table[RefreshDate]; Table[ExchangeAct],day)
measure =
calculate(distinctcount(Table[Name]),Table[Column] = 0)
Thanks! But this is not a little not that.
For example
This user have a difference 1 day in 30.03.2020
And this means that it should be excluded. Must get users who have in every day difference = 0
I created a measure and use it like that.
This user should not be in result because he has difference =1 in 30.03.2020
Hi @Anonymous
try a measure
Measure = CALCULATE(DISTINCTCOUNT(Table[Name]); Table[ExchangeAct] = Table[RefreshDate]; DATESBETWEEN(Table[RefreshDate]; DATE(2020;3;25);DATE(2020;3;30)))
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 47 | |
| 44 |