Forum Discussion
Anonymous
6 years agoNot applicable
dynamic data range
I need a visual to return a range of periods (a month-like time window) according to a selection in a slicer. The range will always be 3 periods, and it will begin with the period selected in the sl...
- 6 years ago
Hi Anonymous ,
Try this:
Dummy measure for filter = VAR DimensionDatePeriod = MIN ( 'DimensionDate'[Period] ) VAR SlicerSelection = MIN ( 'DimensionDateSlicer'[Period] ) VAR DimensionDatePeriodPlus3 = MIN ( 'DimensionDateSlicer'[PeriodPlus3] ) ------------Changed. RETURN IF ( ISBLANK ( SELECTEDVALUE ( DimensionDateSlicer[Period] ) ), ----------Added. 1, IF ( ( DimensionDatePeriod >= SlicerSelection ) && ( DimensionDatePeriod <= DimensionDatePeriodPlus3 ), 1 ) )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
6 years agoCommunity Champion
Wait, why does Per6 display 6,7 and 10 or is that a typo?
If your slicer is connected to your main table? You may need a disconnected table for you slicer.
- Anonymous6 years agoNot applicable
You're correct. It's a typo. I just corrected my post. Sorry about that.
As you can see in my data model picture, the field for my slicer comes from a copy of my Dimension Date table, which is disconnected from my data model.