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
For the most part, this works pretty well, although I have discovered some limitations (to be fair, I didn't ask for this in the beginning). But let's say I want to see everything that is going on in February. If I have an entry that starts on Feb 10 and ends sometime in March, that entry will not be reflected in my visual since it doesn't occur in all of February. I'm not sure how to address that (or if it's even possible)?
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.
- JLambs204 years agoHelper III
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