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

Set Analysis With Relative Selection

Hi All,

I want to create an expression with set analysis based on another time dimension selection?

any ideas ?

MoisAbaque is my selection.

I Want to sum for MoisAbaque, MoisAbaque + 1 and MoisAbaque -1 

Something like That :

Sum({$<Date_Chopin=MoisAbaque

OR Date_Chopin=date(addMonths(MoisAbaque,-1),'YYYYMM')

OR Date_Chopin=date(addMonths(MoisAbaque,+1),'YYYYMM')

>} mynum)

Date_Chopin and MoisAbaque are Date format YYYYMM

I'am using Qlik Sense

Thank You for help,

1 Reply
Not applicable
Author

I think I've got the solution :

Sum({<Date_Chopin = {">=$(=date(Addmonths(MoisAbaque,-1),'YYYYMM'))<=$(=date(Addmonths(MoisAbaque,+1),'YYYYMM'))"} >} mynum)

It works.