Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Expression in pivot table

Hi all,

I have a little problem using a set expression in a pivot table:

in memory I just have a table with a lot of filelds, including Month and SaleAmount

I need a table with a dimesion (Month) and a few expressions (PreviousMonthSales, MonthSales, Percentage) that should look like this:

Month
PreviousMonthSalesMonthSales
Percentage
10121

-

212198-19
39875-23
47511046
511012715
6127117-7
711782-29
88265-20
9658936
108910113
1110197-3
129793-4

While MonthSales is very easy, the problem is PreviousMonthSales, I tried with:

sum({<{Month={$(=avg(Month)-1)}>} TOTAL SaleAmount)

but it don't works. Could please someone explain me why and how can I accomplish this?

Thank you in advance

Carlo A. Babini

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Look into the chart inter record functions like above() function. [With pivoted dimensions to the top, you might need to use before(), though ]

=above(sum(Sales))

or

=before(sum(Sales))

for PreviousMonthSales.

Regards,

Stefan

View solution in original post

2 Replies
swuehl
MVP
MVP

Look into the chart inter record functions like above() function. [With pivoted dimensions to the top, you might need to use before(), though ]

=above(sum(Sales))

or

=before(sum(Sales))

for PreviousMonthSales.

Regards,

Stefan

Not applicable
Author

Wow! I didn't knew about this, I also read about the other functions inter record and... what a powerful toolset!

Thank you so much

Carlo A. Babini