Forum Discussion

gn's avatar
gn
Frequent Visitor
5 years ago
Solved

Button to select slicer values

Hello, 

 

I am looking for a way to create a button that automatically selects multiple options from the slicer, so if the slicer had 10 measures I want a button that if pressed, will automatically select 4 specific measures. For background, in the excel file I am using each measure has its own column, and each measure shows up as a trendline on the line graph. 

 

Would like to know if this is possible, and if so, how?

 

Thanks

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi gn ,

     

    It doesn't seem to be a good idea to create buttons, but you can create a new slicer to achieve the functionality you want.

     

    Sample data

    Method 1:

    Create a table like

     

    Method 2:

    Create a table like

    Measure = IF(ISFILTERED('Table (3)'[Range]),SWITCH(SELECTEDVALUE('Table (3)'[Range]),"A-D",CALCULATE(SUM('Table'[Value]),FILTER('Table',[User] IN {"A","B","C","D"})),"B-H",CALCULATE(SUM('Table'[Value]),FILTER('Table',[User] IN {"B","C","D","E","F","G","H"}))),SUM('Table'[Value]))

     

     

    Best Regards,

    Stephen Tao

     

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

3 Replies

    • gn's avatar
      gn
      Frequent Visitor

      Thanks for the quick response! This is close! but I need the bookmark to be for specific slicer selections, not for the graph itself sadly.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi gn ,

     

    It doesn't seem to be a good idea to create buttons, but you can create a new slicer to achieve the functionality you want.

     

    Sample data

    Method 1:

    Create a table like

     

    Method 2:

    Create a table like

    Measure = IF(ISFILTERED('Table (3)'[Range]),SWITCH(SELECTEDVALUE('Table (3)'[Range]),"A-D",CALCULATE(SUM('Table'[Value]),FILTER('Table',[User] IN {"A","B","C","D"})),"B-H",CALCULATE(SUM('Table'[Value]),FILTER('Table',[User] IN {"B","C","D","E","F","G","H"}))),SUM('Table'[Value]))

     

     

    Best Regards,

    Stephen Tao

     

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