2 Replies Latest reply: Nov 20, 2015 8:50 AM by Danielle van Eeden RSS

    Alternate States & Selections

    Danielle van Eeden

      Hi All,

       

      Just beginning to explore the possibilities of alternate states and have a question I haven't managed to find the answer to.

       

      Basically, I have a pivot table that compares factory statuses by factory name and I have set up 2 alternate states (MonthYearOne & MonthYearTwo) in order to allow the user to choose 2 months to compare.

       

      My problem is that I want all other selections made in the document to apply to the pivot table. I have amended the expression as per the below to allow enable to the table to take into account any selections made on the [Factory Name] field, but want to know if there is any way of allowing selections on all other fields to be taken into account in the alternate state, without having to explicitly include each field name in the expression? I ave numerous other fields that users may want to make selections on in this pivot table.

       

      =if(concat( { MonthYearOne <[Factory Name] = $:: [Factory Name]>} DISTINCT [Factory Status], ', ') <>

           concat( { MonthYearTwo <[Factory Name] = $:: [Factory Name]>} DISTINCT [Factory Status], ', '),

                concat( { MonthYearOne <[Factory Name] = $:: [Factory Name]>} DISTINCT [Factory Status], ', ') )

       

      Any pointers much appreciated!

        • Re: Alternate States & Selections
          Stefan Wühl

          Maybe just use the default set as set identifier and use a set modifier for the MonthYear?

           

           

          =if(concat( { $<MonthYear = MonthYearOne::MonthYear >} DISTINCT [Factory Status], ', ') <>

               concat( {$<MonthYear = MonthYearTwo::MonthYear >} DISTINCT [Factory Status], ', '),

                    concat({ $<MonthYear = MonthYearOne::MonthYear >} DISTINCT [Factory Status], ', ') )

           

          edit: You might need to clear user selections on other calendar fields to avoid incompatible sets, like

          =if(concat( { $<MonthYear = MonthYearOne::MonthYear, Date= >} DISTINCT [Factory Status], ', ') <>

               concat( {$<MonthYear = MonthYearTwo::MonthYear , Date= >} DISTINCT [Factory Status], ', '),

                    concat({ $<MonthYear = MonthYearOne::MonthYear, Date= >} DISTINCT [Factory Status], ', ') )