Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
danielnevitt
Creator
Creator

Straight table - setting date range to view

Hi,

I have a stright table that shows; Company, Value and the min(Create_Date).

I'm trying to view only data that has been created since yesterday.

I have created a variables:

vToday = max(Create_Date)

vYesterday = max(Create_Date)-1

However I am struggling with how to use these variables to only shows companies with a min(Create_Date) of yesterday.

Any help is much appreciated.

Regards,

Daniel


1 Solution

Accepted Solutions
Nicole-Smith

In that case, update your Company dimension to if(aggr(min(Create_Date), Company)>=today()-1, Company) and check Suppress Values When Null.  (See attached.)

View solution in original post

5 Replies
Nicole-Smith

Change your expression from min(Create_Date) to min({<Create_Date={'>=$(vYesterday)'}>}Create_Date).  (See the attached for an example.)

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try this

sum({<Create_Date={'<=$(=Date(vYesterday))'}>}value)


Regards,

Jagan.

danielnevitt
Creator
Creator
Author

Hi Nicole,

Thank you for your reply.

I think I wasn't quite clear enough in my original message.  The table should only show trades where the min create date is yesterday or greater.

As an example:

Company     Create_Date

A                    26/08/2013

A                    27/08/2013

A                    27/08/2013

B                    20/08/2013

B                    26/08/2013

B                    27/08/2013

C                    20/08/2013

C                    21/08/2013

C                    22/08/2013

I am trying to produce a table that shows the following as a result:

Company     Create_Date

A                    26/08/2013

This is because company A is the only company that has a minimum (first) create date of yesterday or greater.

If you are able to help with the above, that would be great.

Thanks,

Daniel

Nicole-Smith

In that case, update your Company dimension to if(aggr(min(Create_Date), Company)>=today()-1, Company) and check Suppress Values When Null.  (See attached.)

danielnevitt
Creator
Creator
Author

Thank you so much for your help.

Regards,

Daniel