Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
olivierbuchy
Creator
Creator

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
Partner
Partner

Perhaps you are not flooring your dates.

load

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