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.
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_date is before the filter date, and the end date is after the filter date. In other words, I need the registries in which dates range is the date of the filter.
Is this possible to do with a date slicer? I have tried to create one and set both fields to filter, but it doesn't allow me to use the slider nor to set different options (greater than and smaller than) for each column. If not, how can I set a filter that allows me to do this?
Thanks! Regards!
Solved! Go to Solution.
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.
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.
@Fátima , refer to this example, it uses a date table, two dates
Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
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 |
---|---|
107 | |
99 | |
76 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |