Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

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
dennisnet
Valued Contributor III

show dates up to today

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.

chauhans85
Esteemed Contributor

show dates up to today

this will help

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

but makedate requires three argument

Makedate(Year,Month,Day)

Not applicable

show dates up to today

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

Re: show dates up to today

Hi Anders,

i hope this helps you.

C u,

Stefano

Community Browser