1 Reply Latest reply: May 22, 2018 8:45 AM by Felip Drechsler RSS

    show dimension values based on condition

    Chandrasekar B

      Hi All,

        Please find the below table.Country dimension as list box if i selected ALL ,in the pivot table i want to show all countries except ALL  otherwise it should show selected country.

      countrySales
      ALL40
      IND20
      USA10
      UK10
        • Re: show dimension values based on condition
          Felip Drechsler

          Hi,

           

          Create a variable with the following:

          =if(only(country)='ALL','{<country=e(country)>}','{<country=P(country)>}')

           

          And as an expression, use:

          sum($(vSetAnalysis)Sales)

           

          With this set, when you select ALL, it gets the excluded values for the country filter (getting all values besides the 'ALL' value) and when selecting anything else, it gets the possible values.

           

          Pictures for reference:

          1. Variable creation

          sample.png

           

          2. Expression:

          sample2.png

           

          Felipe.