Forum Discussion

kumsha1's avatar
kumsha1
Icon for Post Patron rankPost Patron
5 years ago
Solved

Date flag based on slicer selection and Dynamic measure values

Hi,   Is it possible to create a Date flag based on Date slicer selection. Flag should only have Current Date (i.e. slicer value) and previous Date of slicer Date. My requirement is to use a measur...
  • v-yingjl's avatar
    5 years ago

    Hi kumsha1 ,

    Based on your description, you need to create another date table and use it as a slicer:

    Table = DISTINCT('Calendar'[Date])

    Create this tag measure:

    Tag =
    VAR date1 =
        SELECTEDVALUE ( 'Table'[Date] )
    VAR date2 =
        SELECTEDVALUE ( 'Calendar'[Date] )
    RETURN
        IF ( date2 <= date1, 1, 0 )
    

    Attached a sample file in the below, hopes to help you.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.