Hi, I have an table with tasks, time spent on the task and date. I use a slicer to only show tasks/time within a date period.
Now I want to calculate the number of months within the period chosen by the slicer. I have tried using DATEDIFF(MIN(datecolumn);MAX(datecolumn);MONTH) but it wont show the correct value.
I think the problem is that my date column doesnt show ALL dates from the slicer period since I dont have a task each day.
Slicer period: 2018-01-01 to 2018-11-30
Table data based on slicer period
Task time spent date
Task nr1 1 hour 2018-01-20
Task nr2 2 hours 2018-03-01
Task nr3 1 hour 2018-09-20
Can I count the months based on the period chosen with the slicer?
Solved! Go to Solution.
If you don't have a date table, how did you select the 2018-11-30 based on your data here? If you have a model like it in the image, the formula should work.