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: 
Not applicable

Calculate First date and last date

Hi guys,

I want to calculate first date and last date.

Calculation logic : 1.  First date -> From Date of Report = Day before Yesterday.

2. Last date ->  To Date of Report = Yesterday

How can I calculate the above ?

Please Help.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi

I think can use set analysis for this  if  'Bidvalue' is a feidl like this ....

LOAD * INLINE

[

ISIN,Date,Bidvalue

ISN011, 07/22/2016,65.66

ISN012, 07/21/2016,45.5

ISN011, 07/21/2016, 64.42

ISN011, 07/20/2016, 63.45

ISN011, 07/19/2016, 60.52

ISN012, 07/19/2016, 45.45

]

Dimension : Date , ISIN

use following  Expression in the PIVOT TABLE



exper1:((Day before Yesterday Bid Value)

SUM({<Date={"$(=date(Today()-2,'MM/DD/YYYY'))"} >}    Bidvalue)

expr2:Yesterday Bid Value.

SUM({<Date={"$(=date(Today()-1,'MM/DD/YYYY'))"} >}    Bidvalue)

or

use like this ....

sum({<Date={">=$(=date(Today()-2,'MM/DD/YYYY'))<=$(=Date(Today()-1,'MM/DD/YYYY'))"} >}    Bidvalue)

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Hi

check this

Let  From Date of Report=Today()-2

Let To Date of Report  = Today()-1



Not applicable
Author

Thanks for your reply.

Please suggest me how to achieve the following:

1.  Day before Yesterday Bid Value.

2. Yesterday Bid Value.Day before Yesterday Bid Value

   

ISINQuote NameDay before Yesterday Bid ValueYesterday Bid ValuePrice movementPosition analysisSource
Anonymous
Not applicable
Author

Hi

I think can use set analysis for this  if  'Bidvalue' is a feidl like this ....

LOAD * INLINE

[

ISIN,Date,Bidvalue

ISN011, 07/22/2016,65.66

ISN012, 07/21/2016,45.5

ISN011, 07/21/2016, 64.42

ISN011, 07/20/2016, 63.45

ISN011, 07/19/2016, 60.52

ISN012, 07/19/2016, 45.45

]

Dimension : Date , ISIN

use following  Expression in the PIVOT TABLE



exper1:((Day before Yesterday Bid Value)

SUM({<Date={"$(=date(Today()-2,'MM/DD/YYYY'))"} >}    Bidvalue)

expr2:Yesterday Bid Value.

SUM({<Date={"$(=date(Today()-1,'MM/DD/YYYY'))"} >}    Bidvalue)

or

use like this ....

sum({<Date={">=$(=date(Today()-2,'MM/DD/YYYY'))<=$(=Date(Today()-1,'MM/DD/YYYY'))"} >}    Bidvalue)