Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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...
  • Icey's avatar
    Icey
    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.