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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
chris1987
Creator
Creator

Help with Set Analysis - 13 months previous

Hi,

I'm trying to use a simple set analysis function to return a figure from 13 months ago.

I have a master calendar with "MonthID" and just need to return the sum of LineInvoiceAmount.

Here's what I thought would work:

=sum({<[MonthID]={"=(only({1<DateID={'$(=num(date(today(1))))'}>}[MonthID] )-13)"},Description=>}LineInvoiceAmount)

I can enter :

"=(only({1<DateID={'$(=num(date(today(1))))'}>}[MonthID] )-13)"

into a text box and return the correct MonthID and I can filter on that MonthID manually and return the correct results, but I can't seem to get the function to work.

Any help wold be appreciated

Cheers

Chris

 

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

Try this

=Sum({<[MonthID] = {"$(=Only({1<DateID = {'$(=Num(Today(1)))'}>}[MonthID]) - 13)"}, Description>} LineInvoiceAmount)

View solution in original post

2 Replies
sunny_talwar

Try this

=Sum({<[MonthID] = {"$(=Only({1<DateID = {'$(=Num(Today(1)))'}>}[MonthID]) - 13)"}, Description>} LineInvoiceAmount)
chris1987
Creator
Creator
Author

Genius Smiley Very Happy Thanks Sunny