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: 
Not applicable

show dates up to today

I´m trying to show dates up to today in a document, and I have this code as a calculated dimension:


This works to get all dates from 2011-01-01 up to today. But I would like to use makedate(max(year)) or similar to get start of year instead of using '2011-01-01'.

But if I try to use for example if(Date >= makedate(max(Year)) AND Date <= today(), Date) I get an "error in calculated dimension".

I need some input in how to solve this.

Best regards

Anders

if( Datum >= '2011-01-01' AND Datum <= today() ,Datum)

4 Replies
Anonymous
Not applicable
Author

Hi Anders

I don't see any errors in :

     if( Datum >= '2011-01-01' AND Datum <= today() ,Datum)

It works fine by me.

Can you share your QV-file, so we can take a closer look. It could be the format of "Datum" field.

SunilChauhan
Champion
Champion

this will help

aggr( if(Date >= makedate(max(Year)) AND Date <= today(), Date),Year)

but makedate requires three argument

Makedate(Year,Month,Day)

Sunil Chauhan
Not applicable
Author

I will try to use aggr to see if I can get the correct result. 

What I´m trying to do is to create a button with a trigger that makes selections in date so that the user gets dates from start of year up to today. In that way the user gets (for example) the sum of sales from 2011-01-01 up to today (2011-09-21) .  

//Anders

Not applicable
Author

Hi Anders,

i hope this helps you.

C u,

Stefano