Forum Discussion
Fátima
3 years agoHelper II
Filter two dates with just one filter
Hi! I need to filter two columns by one given date. For example, I have registries with the columns "START_DATE" and "END_DATE", so by filtering by date it would return the registries which start...
- 3 years ago
Hi, Fátima
You can try the following methods.
Sample data:
New table:
Date = CALENDAR(MIN('Table'[START_DATE]),MAX('Table'[END_DATE]))Measure = IF ( SELECTEDVALUE ( 'Date'[Date] ) = BLANK (), 1, IF ( SELECTEDVALUE ( 'Date'[Date] ) >= SELECTEDVALUE ( 'Table'[START_DATE] ) && SELECTEDVALUE ( 'Date'[Date] ) <= SELECTEDVALUE ( 'Table'[END_DATE] ), 1, 0 ) )Result:
Hope this method helps you.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-zhangti
3 years agoCommunity Support
Hi, Fátima
You can try the following methods.
Sample data:
New table:
Date = CALENDAR(MIN('Table'[START_DATE]),MAX('Table'[END_DATE]))Measure =
IF ( SELECTEDVALUE ( 'Date'[Date] ) = BLANK (), 1,
IF ( SELECTEDVALUE ( 'Date'[Date] ) >= SELECTEDVALUE ( 'Table'[START_DATE] )
&& SELECTEDVALUE ( 'Date'[Date] ) <= SELECTEDVALUE ( 'Table'[END_DATE] ),
1,
0
)
)
Result:
Hope this method helps you.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.