Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date in Set Analysis??

Hi All,

This I think is a very basic query.

I am a new user. I am working on a chat where there are dates in a field. I am looking to filter the records from that field based on the year 2010. the date format in the records is "mm/dd/yyyy 00:00:00". I have little knowledge of Set Analysis and I have already used a espression to filter the data. In short I want to see the data pertaining only to 2010.

Any help is appreciated, Thanks in Advance.

1 Solution

Accepted Solutions
martin59
Specialist II
Specialist II

In Set Analysis :

{<Date={">=01/01/2010 00:00:00"}>}


There is a better way by creating a year field :

Year(Date) as Year


View solution in original post

9 Replies
martin59
Specialist II
Specialist II

In Set Analysis :

{<Date={">=01/01/2010 00:00:00"}>}


There is a better way by creating a year field :

Year(Date) as Year


Not applicable
Author

Hi Mady_mama,

You could try something like: sum( {$<Year = {2010}>} Sales

Not sure if what you want to measure. count, sum etc........you can just replace this with your requirement.

I hope this points you in the right direction.

Not applicable
Author

Martin,

Bloody Hell, Thanks man it worked... It was so simple and I was trying for 2 hrs now..

Not applicable
Author

Thank you XENA,

Martins reply seems to have worked for me for now. However ty for the reply...

Not applicable
Author

Hello Martin,

Another query pls.. How can I select a null value is Set Analysis? I am working on 2 expressions and for one there are values but for the other one I need to check for Null values (originally there are dates in this column though).

Mady

martin59
Specialist II
Specialist II

I will recommend you to do this :

{<Field={"$(=Null())"}>}


But I'm not sure I understood correctly

Miguel_Angel_Baeyens

Hello,

Try

Sum({1 - < FieldWithNulls = P(FieldWithNulls) >} Sales)


Hope that helps

Not applicable
Author

Martin,

Well I have a DairyCompletedDate where I need to run a filter only on the blank dates. The null values in my fields are shown an '-' I dont think that is a valid character though. Inshort I need to filter and fetch the null values and do we really need Set Analysis here ... If not then how can i include this expression with another filter expression I have for the same chart..?

Hope this is a bit elaborate than the previous post 🙂

Thanks in Advance

Mady

martin59
Specialist II
Specialist II

You can try without Set Analysis :

sum(if(isnull(DairyCompletedDate), Sales))
or
sum(if(len(trim(DairyCompletedDate))=0,Sales))


Hope that helps you