Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

singhcv123
New Contributor II

set analysis issue

Hi ,

I want to create a set analysis with below data:

Fields Name  : Period Number , Year , person

Set analysis for Current Period

Count( {<$Period Number =>}Person)

In Second Set Analysis i want to pick the period code --1 from above value

Count ({<Period Number = {$(Period Number -1 }>}Person)

and in 3rd i want the same period number but last year

Count ({Period Number = , Year ( Addyears(Today()-1)}Person)

Kindly suggest the right combination....i am not getting right outcome from the same..................

Tags (1)
4 Replies
MVP
MVP

Re: set analysis issue

Try

Count ({<Period Number = {$(=Max(Period Number) -1)}>}Person)


resp.


Count ({<Period Number = {$(=Max(Period Number))}, Year = {$(=Max(Year)-1)}>} Person)

Re: set analysis issue

Do you have a sample you can share? Are you using this in a text box object or a chart? If it is a chart what is your dimension? Period Number?

Chanty4u
Esteemed Contributor III

Re: set analysis issue

chk dis

Count ({<Period Number = {$(=Max(Period Number) -1)}>}Person)

Re: set analysis issue

Current Period:

Count( {<[Period Number] = {"$(=max([Period Number]))"}>}Person)


Previous Period:

Count( {<[Period Number] = {"$(=max([Period Number])-1)"}>}Person)


Last Year:

Count( {<[Period Number] = {"$(=addyears(max([Period Number]),-1))"}>}Person)