Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Set Analysis within a Set analysis

I have a field comprised of dates within November and December of 2013:

Posting Date = '11/1/2013','11/9/2013','12/23/2013','12/30/2013'

Instead of putting the dates as individually as it might change, I want to use the fields

Year = 2013

Period = 11,12

So its November and December in 2013.

in set analysis it would be

=sum({$ <

[Year] = {2013},

[Period] = {11,12} 

>}[Posting Date])

The  Posting Date is a field I am using in a set analysis:

=sum({$ <

[Subject to cut off] = {'Yes'},

[Posting Date] = {'11/1/2013','11/9/2013','12/23/2013','12/30/2013'},

[Revenue recognized] = {'Yes'},

>}[Document amount])

Basically, I want to put the Posting Date calculated by set analysis within the set analysis calculating Document Amount. Does anybody know how to do this? Thank you in advance.

1 Solution

Accepted Solutions
krishna_2644
Specialist III
Specialist III

Do this:

In your script:

YEAR([Posting Date])  AS YEAR

DATE([Posting Date],'M') AS PERIOD    //you can also use other Month functions which returns the Month number//

Modify Your expression as

sum({$ <[Subject to cut off] = {'Yes'},

YEAR = {'2013'},[Period] = {11,12}

[Revenue recognized] = {'Yes'},

>}[Document amount])

let me know how it goes.

Thanks

View solution in original post

3 Replies
krishna_2644
Specialist III
Specialist III

Do this:

In your script:

YEAR([Posting Date])  AS YEAR

DATE([Posting Date],'M') AS PERIOD    //you can also use other Month functions which returns the Month number//

Modify Your expression as

sum({$ <[Subject to cut off] = {'Yes'},

YEAR = {'2013'},[Period] = {11,12}

[Revenue recognized] = {'Yes'},

>}[Document amount])

let me know how it goes.

Thanks

Clever_Anjos
Employee
Employee

Are you sure that

=sum({$ <

[Year] = {2013},

[Period] = {11,12}

>}[Posting Date]) returns '11/1/2013','11/9/2013','12/23/2013','12/30/2013', maybe CONCAT()?

Anonymous
Not applicable
Author

Your answer worked. Thank you for your help. For everybody else, Thank you for your help as well.