My database has sales from 2015 through to the current year.I want to use a timeline slicer to filter the date of the current year, for example from March 25 to April 4. In a table view would have the year column, where would return the sale each year from March 25 to April 4.How do I measure this in DAX?I can not find the solution. Can someone help me?
For your requirement, The main demand is a month-day column for filter.
As you said, when March 25 to April 4, unless you filter every year period, otherwise, it will have only one year.
So although you could ignore the year in measure calculation, but in the table view, it only shows one year.
or the timeline slicer is anther date column that has no relationship with the basic data table.
So you could try this way:
Add a month-day column based on date column for timeline slicer
Dateslicer = DATE(1990,MONTH(Sales[Date]),DAY(DAY(Sales[Date])))
Then drag this column into timeline slicer.
Just create a simple SUM measure and drag it with year column into a table view.