Skip to main content
Announcements
Do More with Qlik - Qlik Cloud Analytics Recap and Getting Started, June 19: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
claudio1
Contributor III
Contributor III

Pivot table, add all remaining fields as expressions

Hi,

I have a quite simple question (i would say a dumb question, but i can't believe i have to do this in the way i suppose this is done) :

I have multiple tables in my db and i have to represent them as pivot tables. What i want to do for each pivot table is to add 2 fields as dimensions and the rest as expressions (in my expression i simply want the name of the field).

Now, i am here to ask : why the hell i have to add each single expression manually while i can add all the dimension fields togheter through the chart wizard?

I can't believe i have to add at least 150 fields as expressions manually one by one in that tedious way, it's utterly dumb for me.

Am i missing something? (I hope so!)

Thank you in advance 🙂

Claudio

3 Replies
danielrozental
Master II
Master II

you can build a macro to add the expressions...

claudio1
Contributor III
Contributor III
Author

Hi Daniel,

So i suppose there is no way using the interface 😞

Anyway your solution looks interesting, can you give me more informations? because i have no clue on how to implement such solution...

Thank you,

Claudio

danielrozental
Master II
Master II

I don't have an example as I've never done it myself but you can find examples in the APIGuide.qvw document that gets installed to the program files\qlikview\documentation folder.

Basic example for pivot table addexpression there is

set Graph = ActiveDocument.Sheets("Main").CreateLineChart

Graph.AddDimension "ProductType"

Graph.AddExpression "sum(Amount)"