Forum Discussion

Narukkp's avatar
Narukkp
Helper V
6 years ago
Solved

Slicer selection data

Hi Team,

I have data below format. My requirement is I have one slicer called Day and if I am selecting Monday in slicer then I need to show the Monday(A) & Every Day(D,E,F) related data and same way I am selecting Tuesday then I need to show the Tuesday(B) and Every Day(D,E,F) related data. Could you please suggest me how to achieve this scenario

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi Narukkp ,

     

    Please check the following steps.

    1# Create a calculated table and use it as silcer.

    Table 2 = DISTINCT('Table'[day])

     2# Create the visual you want and create a measure then add it to the visual level filter = is not blank .

    Measure =
    IF (
        NOT ( ISFILTERED ( 'Table 2'[day] ) ),
        1,
        IF (
            SELECTEDVALUE ( 'Table 2'[day] ) = "everyday",
            1,
            IF (
                SELECTEDVALUE ( 'Table'[day] ) = "everyday"
                    || SELECTEDVALUE ( 'Table'[day] ) = SELECTEDVALUE ( 'Table 2'[day] ),
                1,
                BLANK ()
            )
        )
    )

     Result would be shown as below.

     

    Best Regards,

    Jay

    Community Support Team _ Jay Wang

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

7 Replies

  • Hi Narukkp ,

     

    Assuming you only want to have a single selection on your day slicer correct?

     

    Create a table with days for the slicer then add the following measure and use it on the filter of the visualization showing all values equal to 1:

    Filter by day = IF(SELECTEDVALUE(Table[Day]) = SELECTEDVALUE(DaysSlicer[Day]) ||SELECTEDVALUE(Table[Day]) = "EveryDay" ; 1 ; 0)

     

    This will only allow 1 selection of day otherwise will return a blank table.

    • Narukkp's avatar
      Narukkp
      Helper V

      Hi,

      I required the Indidul day and everyday data. That means if i am selecting Monday then Monday & Every day related both need to show.

       

      • MFelix's avatar
        MFelix
        Super User

        Hi Narukkp ,

         

        In the formula I have provided when you select monday it will automatically return Monday and Everyday.

         

        my questions was in the sense if you need for example to select Monday and Tuesday and return monday tuesday and every day?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Narukkp ,

     

    Please check the following steps.

    1# Create a calculated table and use it as silcer.

    Table 2 = DISTINCT('Table'[day])

     2# Create the visual you want and create a measure then add it to the visual level filter = is not blank .

    Measure =
    IF (
        NOT ( ISFILTERED ( 'Table 2'[day] ) ),
        1,
        IF (
            SELECTEDVALUE ( 'Table 2'[day] ) = "everyday",
            1,
            IF (
                SELECTEDVALUE ( 'Table'[day] ) = "everyday"
                    || SELECTEDVALUE ( 'Table'[day] ) = SELECTEDVALUE ( 'Table 2'[day] ),
                1,
                BLANK ()
            )
        )
    )

     Result would be shown as below.

     

    Best Regards,

    Jay

    Community Support Team _ Jay Wang

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

    • Narukkp's avatar
      Narukkp
      Helper V

      Thank you Anonymous . Perfect it is working as expected.. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Narukkp ,

     

    Have your problem be solved? Please consider accept the answer as a solution if it worked.

     

    Best Regards,

    Jay

    Community Support Team _ Jay Wang

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