Forum Discussion
Show items between start and end dates
- 4 years ago
You could swap the MIN('Date'[Date]) for MAX('Date'[Date]), that should do it
Hi JLambs20 ,
Do you mean to only show that both the start date and end date are within the selected date range? For example:
Is Task Visible =
VAR startDate =
SELECTEDVALUE ( 'Table'[start date] )
VAR endDate =
SELECTEDVALUE ( 'Table'[end date] )
RETURN
IF (
startDate >= MIN ( 'Date'[Date] ) -----------------changed
&& (
ISBLANK ( endDate )
|| endDate <= MAX ( 'Date'[Date] ) --------------changed
),
1,
0
)
For more details, please check the attached .pbix file.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Icey!
From what I'm seeing, you are close but it's not quite what I'm after. If you look at my screenshot here, there are two tasks (green/dark blue) that span a few similar dates. In this case, they both span Jul 22 to Jul 31. However, the bottom task (dark blue, kind of obscured) does not start or end within that time range.
So what I am looking for is if I were to select an individual date, or a particular month, I would like to see all of the tasks that either start, end, or occur in my selection. But as you can see below when I select just July, nothing appears in the gantt.
If I could select either a year, quarter, month, or day and see all tasks in that date range, regardless of whether they start, end, or occur in that date frame, that's what I'm ultimately after.
So, in the above example, when I select the month of july, I want to be able to see both the green and dark blue tasks in the gantt chart because they both occur in July, even though the dark blue task does not have a start or end in July. Make sense?
Thanks!
Josh