Slicer selection to influence color in chart

My client has a bar chart in which she wants bars to "light" up (and the rest to fade to grey) when she selects a particular "store" in het slicer on her dashboard.

Is this possible ?

2replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Here is how I accomplished this with the AdventureWorks sample cube:

    1. For the hierarchy that you have on your Rows axis, create a parameter.  In my case, I am using Customer Geography.Country.  The parameter is what is going to allow you to focus on just one member that you want to highlight.
    2. Create a named set based on your parameter.  You will select the siblings of the parameter.  This reverses what you did in step 1:  instead of only focusing on 1 member, you are now also focusing on the all members on this level of your hierarchy.  You will use this named set in your rows axis.
      1. --Code for named set
        [Customer].[Customer Geography].[!@parmCounty@!].SIBLINGS
        
    3. Create a calculated measure to represent your highlighted member.  It's returning a measure's value if your parameter is equal to the current member on your Rows axis.  Otherwise, nothing is returned
      1. --Code for calculated measure
        CASE
           WHEN [Customer].[Customer Geography].[!@parmCounty@!].UNIQUENAME = [Customer].[Customer Geography].CURRENTMEMBER.UNIQUENAME THEN [Measures].[Internet Sales Amount]
           ELSE NULL
        END
             
    4. Create a calculated measure to represent the opposite:  If your parameter is equal to the current member, then returning nothing, otherwise return the measure's value
      1. --Code for calculated measure
        CASE
           WHEN [Customer].[Customer Geography].[!@parmCounty@!].UNIQUENAME <> [Customer].[Customer Geography].CURRENTMEMBER.UNIQUENAME THEN [Measures].[Internet Sales Amount]
           ELSE NULL
        END
    5. Select both of your new calculated measures for the Columns axis
    6. Change your chart type to Stacked Column
    7. Your chart should have one series for each of the measures.  Edit each series to use a different color.  In my example, I am choosing red for my highlighted measure (Step 3), and black for my regular measure (Step 4).

     

    Results are as below.  You can of course leave off the legend for your production rollout.  I left it on for demonstration purposes.

     

     

     

    Reply Like 1
  • Thank you very much, I will try to follow this example :)

    Reply Like
login to reply
Like Follow
  • Status Answered
  • 1 mth agoLast active
  • 2Replies
  • 130Views
  • 3 Following