Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have a table that have date start and date end
I have a date filter
I want to filter rows that have have at least one day in the date range
Is there something wrong with the logic, here?
Solved! Go to Solution.
Hi @Mumin192
please try
Measur =
CALCULATE (
DISTINCTCOUNT ( work_sessions_processed[user_id] ),
FILTER (
work_sessions_processed,
VAR StartDate = work_sessions_processed[date_start]
VAR EndDate = work_sessions_processed[date_end]
VAR Dates1 =
CALENDAR ( StartDate, EndDate )
VAR Dates2 =
VALUES ( 'Calendar'[Date] )
RETURN
NOT ISEMPTY ( INTERSECT ( Dates1, Dates2 ) )
)
)
Hi @Mumin192
please try
Measur =
CALCULATE (
DISTINCTCOUNT ( work_sessions_processed[user_id] ),
FILTER (
work_sessions_processed,
VAR StartDate = work_sessions_processed[date_start]
VAR EndDate = work_sessions_processed[date_end]
VAR Dates1 =
CALENDAR ( StartDate, EndDate )
VAR Dates2 =
VALUES ( 'Calendar'[Date] )
RETURN
NOT ISEMPTY ( INTERSECT ( Dates1, Dates2 ) )
)
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
23 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
42 | |
39 | |
19 | |
19 |