Forum Discussion

kala2's avatar
kala2
Icon for Helper III rankHelper III
4 years ago
Solved

Slicer select from two Columns (Filter charts)

I have two Columns as displayed below:


And my slicer is: 


Is it possible to filter only the "Yes" values when select some of the selections?
Created a DAX but seems not to be working.

VAR Selection =
      SELECTEDVALUE ( Table[SBU Attribution] )
RETURN
     SWITCH (
        Selection = "BAS",  SUMMARIZE(FILTER(Table, Table[SBU Attribution Value]="Yes")

     )


  • Hi kala2 ,

     

    Not really sure about what you need to achieve but you measure is incorrect try the following change:

    VAR Selection =
          SELECTEDVALUE ( Table[SBU Attribution] )
    RETURN
         SWITCH (
            Selection,  "BAS",  COUNTROWS(SUMMARIZE(FILTER(Table, Table[SBU Attribution Value]="Yes"))
         )

     

    Now use this measure has a filter of your visualization and set it has has greater than 0 or different from blank.

3 Replies

  • Hi kala2 ,

     

    Not really sure about what you need to achieve but you measure is incorrect try the following change:

    VAR Selection =
          SELECTEDVALUE ( Table[SBU Attribution] )
    RETURN
         SWITCH (
            Selection,  "BAS",  COUNTROWS(SUMMARIZE(FILTER(Table, Table[SBU Attribution Value]="Yes"))
         )

     

    Now use this measure has a filter of your visualization and set it has has greater than 0 or different from blank.

    • Icey's avatar
      Icey
      Icon for Community Support rankCommunity Support

      Hi kala2 ,

       

      Can my reply above solve your problem?

       

       

      Best Regards,

      Icey