Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Still more nightmare with dates

Can't seem to be able to use a date in a calculated dimension:

1) Load statement

date#(<Input String>,'DDMMYYYY') as ExportDate

2) Variables

SET lastExport = max({1} DateExport )

3) Calculated dimension in my chart

=if(DateExport=$(lastExport), Catégorie)

//This yields a msg "Error in calculated dimension"

=if(DateExport='$(lastExport)', Catégorie) //Notice the single quotes

//This yields no result (condition seems to be always wrong)

Help!

12 Replies
sasiparupudi1
Master III
Master III

May be try like this

=if(DateExport=$(lastExport), [Catégorie])

tresesco
MVP
MVP

Sorry, one more correction.

Redefine your variable like:

SET lastExport = '=max({1} DateExport )';    // note equal sign and single quotes

Then expression:

=if(DateExport=lastExport, Catégorie)          // '$' not required

simenkg
Specialist
Specialist

Perhaps you are not flooring your dates.

load

Date(Floor(date#(yourDateString,'DDMMYYYY'))) as ExportDate,