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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
shyamcharan
Creator III
Creator III

Set Variable expression issue

Hi Experts,

I am in a stage of learning the SETS and encountered an issue while working on an example dashboard.

Attached is a QVW document where I have a Straight Table and I do not get any results in this table.

I have created variable vSetPreviousNMonth and used this variable in the sets of the chart expressions.

The definition of this variable is :

PeriodID = {$(=Max(PeriodID) – $1)},

Year = ,

Quarter = ,

Month = ,

Period =

The expressions are :

Sum({$<$(vSetPreviousNMonth(0))>} [# Departures Performed])

Sum({$<$(vSetPreviousNMonth(1))>} [# Departures Performed])

Sum({$<$(vSetPreviousNMonth(2))>} [# Departures Performed])

Can anyone please tell me what mistake I am doing.

Thanks heaps in advance.

Regards,

Shyam.

1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi Shyamcharan,

In the following expression change the hyphen(-) symbol to minus symbol as the Qv calculation does not accept the above.


PeriodID = {$(=Max(PeriodID) – $1)}



Thanks,

Vignesh


View solution in original post

3 Replies
Anonymous
Not applicable

Hi Shyamcharan,

In the following expression change the hyphen(-) symbol to minus symbol as the Qv calculation does not accept the above.


PeriodID = {$(=Max(PeriodID) – $1)}



Thanks,

Vignesh


awhitfield
Partner - Champion
Partner - Champion

Hi

looks like you are using 'Qlikview11 for Developers', Vignesh is correct:

PeriodID = {$(=Max(PeriodID) - $1)},
Year = ,
Quarter = ,
Period = ,
Month = 

You can always check it against the solution file supplied for the book

shyamcharan
Creator III
Creator III
Author

Thanks Vignesh.

Thats solved my issue.