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

Set Analysis Operation

Hello,

I am an beginner on QlikView, and I would return the result (here Valu) of the year selected (here named AsOf) minus the year before (AsOf -1) in a Pivot Table. I tried this, but it returns all the result of all periods:

Capture.PNG

Do you have any advice?

Thank you in advance for your help,

Cocalero

7 Replies
sunny_talwar

May be something like this:

Sum(Valu) - Above(Sum(Valu))

with AsOf as your dimension

swuehl
MVP
MVP

Yes, maybe chart inter record functions can help you here.

But in a pivot table, and depending on your dimension sort order, you might need to use

=Sum(Valu) - Before(Sum(Valu))


or


=Sum(Valu) - After(Sum(Valu))


or


=Sum(Valu) - Above(Sum(Valu))


or


=Sum(Valu) - Below(Sum(Valu))


Also, with multiple dimensions, AsOf needs to be the inner most horizontal or vertical dimension.


If this is not helping you, please post some more details, like your current chart dimensions and expressions used.


Regards,

Stefan

swuehl
MVP
MVP

And reading that you have selected a value, all this might not really help you, but maybe

Sum({<AsOf = {'$(=Max(AsOf)-1)'}>} Value)

Anonymous
Not applicable
Author

Thanks for your return swuehl, but it doesn't work :/.

Here my table of AsOf (Always one selected):

Capture.PNG


I would like a Pivot table which returns the result (Valu) between 2 months (AsOf - (AsOf -1))

The Expression that i tried:

Capture.PNG

Any idea please ?

Thanks for advance of your help,

Cocalero.

swuehl
MVP
MVP

You were talking about a year selected in your OP, right? This list box shows dates, so your set expression needs to look like

Sum( {<AsOf = {$(=Date(AddMonths(AsOf,-1),'DD/MM/YYYY'))} >} Value)

Anonymous
Not applicable
Author

Thanks for yours return but it doesn't work 😕

I tried this:

Capture.PNG

swuehl
MVP
MVP

And 'doesn't work' means exactly what? No result, wrong result, or...?

Have you checked that the dollar sign expansion returns the correct date?

And if you are using AsOf as dimension in your table, you probably need to use the total qualifier to get your expression result in a cell that refers to a current AsOf value:

Sum(TOTAL  {<AsOf = {$(=Date(AddMonths(AsOf,-1),'DD/MM/YYYY'))} >} Value)

If you are using additional fields (and also AsOf field) as dimensions, you need to state these fields in the TOTAL field list:

TOTAL<Dim1>