Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Extract set of Dates

Hello Guys,

I have column with dates ranging from  2015/01/01 to 2019/01/01 in 'YYYYMMDD' format.

I need to have a separate column with All dates Greater than 2016/01/01 .

Kindly help.

Thanks,

Ravi

1 Solution

Accepted Solutions
sunny_talwar

2 options

1) Use calculated dimension

If(DateField>= MakeDate(2016), DateField)

2) Use Set Analysis

Sum({<DateField = {"$(='>=' & Date(MakeDate(2016), 'YourDateFieldFormatHere'))"}>}Measure)

View solution in original post

10 Replies
sunny_talwar

May be you can just do this

LOAD Date,

     If(Date >= MakeDate(2016), Date) as NewDateColumn

FROM ...

Anonymous
Not applicable
Author

Thanks Sunny,

sorry but it does not work for me .

I want this expression in visualization:-

My column name is :- PIDates

makedate fucntion wil it be like this :- 2016/01/01

sunny_talwar

Not sure I follow... can you provide more details? A sample may be?

Anonymous
Not applicable
Author

Ok I have attached a sample file . Kindly find the attachment .

Thanks,

ravi

sunny_talwar

I see a bunch of dates... what do we do with them ...

Anonymous
Not applicable
Author

Yes I want to create another column with all dates greater than 2016/01/01. As I have to use this as a expression in a visualization.

sunny_talwar

So this is used a dimension and you want to only see data after 2016/01/01? If this is true, check out Dates in Set Analysis

Anonymous
Not applicable
Author

Yes you are right I want to use it as Dimension.

Thanks for the link but I guess , I am not able to relate it to my scenario .

can u suggest some expression if you could ?

Thanks

sunny_talwar

2 options

1) Use calculated dimension

If(DateField>= MakeDate(2016), DateField)

2) Use Set Analysis

Sum({<DateField = {"$(='>=' & Date(MakeDate(2016), 'YourDateFieldFormatHere'))"}>}Measure)