Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Aho
Contributor II
Contributor II

Pivot Table - Only show Totals on multiple colum selection

Hi all

Is it possible to have a dynamic Totals colum in a pivot table?

In this example I have the sales for two companies and a Totals colum.

    Sales  
Product Totals Company A Company B
A 10 5 5
B 20 10 10
C 30 15 15

 

If I only select one company I don't want to show the Totals colum as I will have two colums with the same data.

  Sales
Product Company A
A 5
B 10
C 15

 

Thanks

Andreas

Labels (2)
1 Solution

Accepted Solutions
Aho
Contributor II
Contributor II
Author

Hi Marcus

Thanks! It works as intended with this expression:

 

  • If (count(distinct Company)=1 and secondarydimensionality()=0, 0, 1)

 

/Andreas

View solution in original post

2 Replies
marcus_sommer

You may try it with an extended expression, like:

if(count(distinct Company) = 1 and secondarydimensionality() = 0, null(), YourExpression)

- Marcus

Aho
Contributor II
Contributor II
Author

Hi Marcus

Thanks! It works as intended with this expression:

 

  • If (count(distinct Company)=1 and secondarydimensionality()=0, 0, 1)

 

/Andreas