Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

R Script or Filter Dynamics for Date

Hi everyone, I wanted to ask if it was possible and how to create a dynamic command that checks the date and automatically sets a visual filter on it.   For example: - today 01 January 2022, the...
  • v-yanjiang-msft's avatar
    4 years ago

    Hi Anonymous ,

    The slicer can't automatically choose one value, but it can be filtered out.

    Create a measure.

    Check =
    IF (
        QUARTER (
            MAXX (
                FILTER (
                    ALL ( 'Table' ),
                    'Table'[Year Quarter] = SELECTEDVALUE ( 'Table'[Year Quarter] )
                ),
                'Table'[Date]
            )
        )
            = QUARTER ( TODAY () ),
        1,
        0
    )
    

    Put the measure in the visual filter, and select it to 1, the current quarter in the slicer will be filtered out.

    I attach my sample below for reference.

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.