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: 
Not applicable

Column() in Totals header in Pivot Table doesn't work

Hi,

I've got a pivot table with Categories as the far left column, the next column is Sales Order Number. In the Totals for Sales Order Number I would like to show a sales quota that is depending on Category.

I'd like to do something such as:

=If(Column(1) = 'Accessories', $(vQuoteAccessories),
If(Column(1) = 'Bikes', $(vQuoteBikes)......

But it seems like Column()-function isn't working in Totals-field (?)

Any ideas how to solve this?

best regards

2 Replies
klausskalts
Partner - Creator
Partner - Creator

Totals will never work when you have different "results" of your if-statement - unless you have SUM/COUNT/AVG etc outside your ()'s

if(Category=1, Qty_Bikes, if(Category=2, Qty_Prams, Qty_Others))

will not work - but thewhen altered like below it will work:

Sum(if(Category=1, Qty_Bikes, if(Category=2, Qty_Prams, Qty_Others)))

OK?

Not applicable
Author

Ok I see, thanks for replying!

So in my situation with two columns (Category as the far left and SalesOrderNumber as the second column), the column with SalesOrderNumber has partial sums checked so it shows a Totals-field for each category.


It isn't possible to show the name of the category in the Totals-field (So that it would show Bikes in the totals-field when the left column is Bikes and Accessories in the next total-field when that corresponding left column is Accessories? (Because it would be different "results"?)

cheers!