Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to hidden the Total Field ?

Figure 1 : Pivot Table

original.jpg

Figure 2 : Hidden the 3 total field

modifyl.jpg

4 Replies
swuehl
MVP
MVP

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 )

Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author

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

swuehl
MVP
MVP

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