Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewaf
Creator
Creator

Set Analysis - range dates

Hi Guys,

i'm trying to create this range for Surgery Date using a variable (the one in bold).

i tried several times but is not working... how i can fix this?
Thank you!!

 

if(Match([SalesRepException],'I22') AND SurgeryDate>=($(vStartI22)) AND SurgeryDate<=($(vStartI22)+365),'30',

2 Replies
timothyj
Creator
Creator

Did you try adding single quotation marks?

if(Match([SalesRepException],'I22') AND SurgeryDate>=('$(vStartI22)') AND SurgeryDate<=('$(vStartI22)'+365),'30',

Also try using AddMonths instead of +365.

if(Match([SalesRepException],'I22') AND SurgeryDate>=('$(vStartI22)') AND SurgeryDate<=AddMonths('$(vStartI22)', 12),'30',

 

Davis25
Contributor
Contributor

Set analysis offers a way of defining a set (or group) of data values that is different from the normal set defined by the current selections. Normally, when you make a selection, aggregation functions, such as Sum, Max, Min, Avg, and Count aggregate over the selections that you have made: the current selections.