4 Replies Latest reply: Dec 27, 2012 11:28 AM by Stefan Wühl RSS

    How to hidden the Total Field ?

    Vc Wu

      Figure 1 : Pivot Table

       

      original.jpg

       

      Figure 2 : Hidden the 3 total field

      modifyl.jpg

        • Re: How to hidden the Total Field ?
          Stefan Wühl

          You can check with dimensionality() function (or secondarydimensionality() for pivoted dimensions, like in your sample) if your expression is evaluated in a total context, and only execute your calculation if not):

           

          if( secondarydimensionality() ,

          YOUREXPRESSION )

            • Re: How to hidden the Total Field ?
              Vc Wu

              Hi swuehl,

               

                 THKS!

               

                 expression : Target Rate % = Sum (Income)/Sum (Target)

               

                 If  change to  :

               

                                    if( secondarydimensionality() , Sum (Income)/Sum (Target))

               

                

                The Target Rate %  row is null ,  not only total Field(right side)

                 XX.PNG

              • Re: How to hidden the Total Field ?
                Vc Wu

                Hi swuehl,

                 

                   THKS!

                 

                   expression : Target Rate % = Sum (Income)/Sum (Target)

                 

                   If  change to  :

                 

                                      if( secondarydimensionality() , Sum (Income)/Sum (Target))

                 

                  

                  The Target Rate %  row is null ,  not only total Field(right side)

                   XX.PNG

                  • Re: How to hidden the Total Field ?
                    Stefan Wühl

                    Ah, you pivoted your expressions to the left, so this seems to prevent the secondarydimensionality() function from working (like I expected).

                    I think you need to use dimensionality() in this case.

                     

                    It is probably best if you create a new expression with just

                     

                    =dimensionality()

                     

                    and check the outcome. You should see different values depending on the level of hierarchy the expression is evaluated in. (I would assume something like 3, 2 and 0 in your case).

                     

                    Assume your total at the right is returning a dimensionality() of 2, then you need to change your expression to

                     

                      if( dimensionality() <> 2 , Sum (Income)/Sum (Target))

                     

                    Hope this helps,

                    Stefan