Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Date variables and set analysis

Hello everyone,

I'm trying to use a date variable in set analysis but can't get it to work

This works perfectly:

Sum({< Date = {'07/09/2015'} >} RedFlag)

I have a variable, vDay1 that is set in the document as Max(Date)  however I can't get it to show the correct figure:

Sum({< Date = {'$(=vDay1)'} >} RedFlag)

I know that set analysis can be tricky with date formats sometimes however Date and vDay1 should be the same format since vDay1 = Max(Date)?

What am I doing wrong?

1 Solution

Accepted Solutions
sunilkumarqv
Specialist II
Specialist II

try this

Sum({< Date={"$(=$(vDay1))"} >} RedFlag)

View solution in original post

4 Replies
PrashantSangle

Hi,

try with double quote " "

Sum({< Date={"$(=vDay1)"} >} RedFlag)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
jonathandienst
Partner - Champion III
Partner - Champion III

Define vDay like this:

    Set vDay1 = =Date(Max(Date), 'dd/MM/yyyy');  // note == is NOT a typo

Use like this

    Sum({< Date = {'$(vDay1)'}>} RedFlag)


Or, if you prefer not to change the definition of vDay1, then rewrite the expression:


    Sum({< Date = {"$(=Date(vDay1, 'dd/MM/yyyy'))'"}>} RedFlag)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sunilkumarqv
Specialist II
Specialist II

try this

Sum({< Date={"$(=$(vDay1))"} >} RedFlag)

Kushal_Chawda

Sum({< Date = {'$(=vDay1)'} >} RedFlag)


where vDay1= date(max(Date))


or


Sum({< Date = {"$(=date(max(Date)))"} >} RedFlag)