3 Replies Latest reply on Apr 20, 2018 11:45 AM by Mark Holtz

    Action filter on only 1 bar

    Cindi Simpson

      I have a requirement where we show current year and last year data in a bar chart together.  My client wants to only see the action filter on the current year bar, instead of both.  Is there a way that can be done?  I have attached a workbook that is similar to what I am trying to do.  I want to only see the Filter 1 action on the 2012 bar, not the 2011 bar as well.

        • 1. Re: Action filter on only 1 bar
          Mark Holtz

          I don't think you can prevent a filter action from affecting specific MEMBERS of a dimension (specific YEARS within your date dimension).

           

          But I think you can create a calculated field that fails to return a matching value for dimension members (years) you don't want to be impacted by an action.

           

          I haven't tested this, but I think it'll do what you're after!

           

          e.g.,

          Create a calculated field that you'll use in the target view that the action controls:

          I'll call this calculated field: [Date for Action]

          IF YEAR([Date Field]) = 2011 //include whatever conditions you want the action to be "neutered" for

          THEN NULL ELSE [Date Field] END

           

          Then, put this [Date for Action] field in the Detail Shelf of the target view so it's available to set as the target field when linking the action.

          Use [Original Date] from the source view to target [Date for Action] in the target view.

           

           

          Another way to do this (maybe overkill) is to duplicate the data source and build ActionSourceView from source A where the [Date for Action] field is just equal to [Original Date] and then build ActionTargetView from source B where the [Date for Action] is built as described above. Now, when you make the action connect A.[Date for Action] to B.[Date for Action], the values won't match (which is what you want) and your action won't do anything when you click on 2011.

          1 of 1 people found this helpful
          • 2. Re: Action filter on only 1 bar
            Cindi Simpson

            I can see where you are going with this and it may be able to work, if my data was all in 1 query.  I am going to keep this in mind for when I combine all the queries in one.  Thank you!

            • 3. Re: Action filter on only 1 bar
              Mark Holtz

              You don't have to combine to 1 query.

              You can make Actions work across views that can are built from different sources.

              Just change the source and field in the mapping for the action.

               

              I added the field I was describing. (I didn't have 10.5 at home, but I do at work.)

               

              The action still "runs" for 2011, but won't show any data for 2011 since I made the "Year for Action" field return NULL when the year of the date field was 2011.