Forum Discussion
Anonymous
7 years agoNot applicable
Filter a table by date using DAX
Hello, How can I filter a table for a date field using DAX? I have a date range to filter. The output would be a second table. Thank you!
- 7 years ago
Hello Anonymous
Give this a try, you will just need to change the table and column names to match your data.
Filtered Sales = CALCULATETABLE( Sales, DATESBETWEEN ( Sales[Sales Date], DATE(2019,1,15), DATE(2019,2,5) ) )This creates a new table called 'Filtered Sales' that is the Sales table filtered to 1/15/2019 - 2/5/2019
jdbuchanan71
7 years agoSuper User
Hello Anonymous
Give this a try, you will just need to change the table and column names to match your data.
Filtered Sales =
CALCULATETABLE(
Sales,
DATESBETWEEN ( Sales[Sales Date], DATE(2019,1,15), DATE(2019,2,5) )
)This creates a new table called 'Filtered Sales' that is the Sales table filtered to 1/15/2019 - 2/5/2019
- Anonymous7 years agoNot applicable
Thank you so much! Your method worked for me
- Lucho_MOB5073 years agoNew Member
Hello, is there any option using the filter parameter used in the report? Because i'm trying but the selected date not filter