Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

ravishinge
Contributor

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

Re: Extract set of Dates

2 options

1) Use calculated dimension

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

2) Use Set Analysis

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

10 Replies

Re: Extract set of Dates

May be you can just do this

LOAD Date,

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

FROM ...

ravishinge
Contributor

Re: Extract set of Dates

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

Re: Extract set of Dates

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

ravishinge
Contributor

Re: Extract set of Dates

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

Thanks,

ravi

Re: Extract set of Dates

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

ravishinge
Contributor

Re: Extract set of Dates

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.

Re: Extract set of Dates

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

ravishinge
Contributor

Re: Extract set of Dates

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

Re: Extract set of Dates

2 options

1) Use calculated dimension

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

2) Use Set Analysis

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

Community Browser