Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
My report consists of a line chart that is controlled by a date slicer (you pick the start and end date) and a few measures.
I have no issues with the line chart, but I would like to use the date slicer as a filter in the measure calculations. One measure could be called yearly incidents, where I use COUNTROWS() and some filters to calculate the incidents over a specific time period.
I would like to display the yearly number of incidents and this year would be controlled by the date slicer. For example, picking a end date of 30.5.2019 would select 2019 to be used as the filter and the measure calculation would include all events from this year (until today). Even if we picked a start date of 1.5.2019, the measure still needs to display all incidents from this year. So, the date slicer can't be linked to the measure card in interactions.
I tried to extract the year by using
What would be the best way to implement this? I'm using DirectQuery if that impacts something (I could always switch over to Import if needed).
Solved! Go to Solution.
Hi,
In the filter portion of the CALCULATE() function, try this
DATESBETWEEN('Date'[Date],DATE(YEAR(MIN('Date'[Date])),1,1),TODAY())
Does this work?
Hi @PowerBI101 ,
Have you solved your problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please share your data sample and your desired output.
Best Regards,
Cherry
Hi,
In the filter portion of the CALCULATE() function, try this
DATESBETWEEN('Date'[Date],DATE(YEAR(MIN('Date'[Date])),1,1),TODAY())
Does this work?
Hi @PowerBI101 ,
To understand your scenario better, could you share some data sample which could reproduce the scenario and your desired output so that we could help further on it?
Best Regards,
Cherry
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!