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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
stevelord
Specialist
Specialist

Variables in script to create a non-standard date range field?

Hi I want to make "Campaign1" and "Campaign2" fields in my script to replace TestYear in the below chart aggr() expression.

if(If(BMI, Count(Aggr(Max(TestDate), ClientAccountName, UserId, TestYear))), only(if(TestDate>=vCohort1MinDate and TestDate<=vCohort1MaxDate, BMI)))

I want something like this, but stuck on syntax

if(TestDate>=vCohort1MinDate and TestDate<=vCohort1MaxDate) Dual([Campaign 1], 1)

if(TestDate>=vCohort2MinDate and TestDate<=vCohort2MaxDate) Dual([Campaign 2], 2) as Campaign

So on a pivot table I'd use Campaign instead of TestYear and get headers Campaign 1 and Campaign 2 instead of 2012 and 2013

Quick help would be much appreciated.  I'm googling in the meantime.  Thanks!

-Steve

Labels (1)
0 Replies