Forum Discussion
Date Range Slicer for Multi-Date Range
- 5 years ago
Hi Anonymous ,
Create a measure as below:
Show? = var _mindate=MINX(ALLSELECTED('Table'),'Table'[Date Filter Range]) var _maxdate=MAXX(ALLSELECTED('Table'),'Table'[Date Filter Range]) Return IF((MAX('Table (2)'[End Date]) in FILTERS('Table'[Date Filter Range])&&MAX('Table (2)'[End Date])>=_mindate)||(MAX('Table (2)'[End Date])>=_maxdate&&MAX('Table (2)'[Start Date])<=_maxdate),"yes","no")And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
Anonymous You want a Complex Selector. An example is here. https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534
Basically a measure that returns 1 or 0 and you filter on it. Specifics vary but I would imagine in your case you would get the MIN and MAX of the date column in your date range slicer and then use a SWITCH or IF statement to determine if it is in range. I wasn't clear on whether just part of it had to be in range or all of it.
- Anonymous5 years agoNot applicable
Greg,
Thank you for the Reply.
Just part of the StartDate/EndDate range needs to be within the "Date Range Slicer" selection to include the job site.