Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adding expression as column

Hello. I've got chart at which i'm calculating values of a few dates. I'd like to have pivot table where at the top side there are values from one expression and the rest of expressions and dimentions to be at the left side of the table. Is it possible?

Second question - i want to make avg of a few fields. I've got column where i get sum of fields and from this sums i want avg. There are some values missing. Any ideas?

10 Replies
stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Creating your chart and setting it to be a pivot is the simplest way of getting dimensions along the top and down the side.  It can be a bit fiddly pulling the dimensions to the correct places on the pivot, but it can be done.

If, however, you want to have different expressions in different columns (e.g. 12 months, then an extra column for averages) this can get problematic.

You can achieve some things by using the dimensionality and secondarydimensionality functions, which allow you to do different calculations depending on whether you are in a cell in the middle of the pivot or in a total column.  This does not allow you to do everything though.

Often I find that the only way to do columns for each month then additional columns (eg. average and total columns) is to have a separate expression for each month, and then expressions for the extra columns also.  For the month columns Set Analysis is required to get the single month values.  The expressions for the extra columns can then either reference the results of the prior columns, or use set analysis again over a broader period.

Hope that helps.

Steve