Forum Discussion
How to Allow a User to easily Filter for Any Project between two dates
- 5 years ago
Hi, DataUser
Please check the below picture and the sample pbix file's link down below, whether it is what you are looking for.
the measure is in the sample pbix file.
At this moment, I did not create any relationship between two tables, but if you need it later, you can create an inactive relationship and use USERELATIONSHIP DAX function in a measure.
https://www.dropbox.com/s/wmhkjkfuhs5n79e/datauser.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Thanks - Taking it a step further, is there a way to make another measure that states the status? Ie: On-Going, Starting, or Ending and applies it to each project within the date range?
Hi, DataUser
Thank you for your feedback.
Please try the below measure.
I am not quite sure whether I defined the meaning of Ending / Ongoing / Starting correctly or not.
Please insert the below measure into your visualization and you can try to fix the wordings if I defined those in the other way round.
Status flag =
SWITCH (
TRUE (),
SELECTEDVALUE ( Projects[Project Start] ) <= MIN ( dates[Date] )
&& SELECTEDVALUE ( Projects[Project End] ) >= MIN ( dates[Date] ), "Ending",
SELECTEDVALUE ( Projects[Project Start] ) >= MIN ( dates[Date] )
&& SELECTEDVALUE ( Projects[Project End] ) <= MAX ( dates[Date] ), "Ongoing",
SELECTEDVALUE ( Projects[Project Start] ) <= MAX ( dates[Date] )
&& SELECTEDVALUE ( Projects[Project End] ) >= MAX ( dates[Date] ), "Starting"
)