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

Calculated Date Dimension

I am trying to create a calculated dimension that returns a date in a straight table chart. There is a dimension already called finish date and I would like to calculate a date 60 days prior to that finish date.  Can anyone advise me please?

1 Solution

Accepted Solutions
oknotsen
Master III
Master III

Hi,

dateField - 60.

Yes, that easy.

You might need to reform the result back to date, so maybe date(dateField - 60).

May you live in interesting times!

View solution in original post

5 Replies
oknotsen
Master III
Master III

Hi,

dateField - 60.

Yes, that easy.

You might need to reform the result back to date, so maybe date(dateField - 60).

May you live in interesting times!
ziadm
Specialist
Specialist

I would suggest creating a new data dimension on the load script and do not use the calculated dim for performance issues

Load *,

(finish date - 60) as NewDate


This NewDate is you Dimension



Not applicable
Author

date(num(datefield)-60) as newfield

Anonymous
Not applicable
Author

That worked, thanks a lot. 

oknotsen
Master III
Master III

Happy I could help.

Please note that from a performance point of view, I would advise to add this value as a field to your data model instead of using a calculated dimension.

Enjoy!

May you live in interesting times!