Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

How to write the Date Expressions with the Offset -1 for day/Month

The data displayed on the report have an offset of -1, ie, on April 19th, the data is as of April 18th.

Need to  offset the day by ‘-1’.

When the report is opened, the month filter should be on March not on April. You need to  offset the day by ‘-1’

By using this variable able to display the Previous day.

How to write in if else conditional statement if(April-1)->March

LET vRefreshDate = Today()-1;

1 Solution

Accepted Solutions
Highlighted

Yes that is what it will give you.

vRefreshMonth = Month(Today() - 1)

vRefreshDate = Date(Today() - 1)

View solution in original post

10 Replies
Highlighted

May be this:

vRefreshMonth = Month(Today() - 1)

or for date

vRefreshDate = Date(Today() - 1)

Highlighted
Champion III
Champion III

or

=date(urdate-1)


or


=Date(Today()-1)

Highlighted
Contributor III
Contributor III

If I' Using the vToday() then above things will work.I have a Column with Cal_Year.

By max(Cal_Taer) i can get the max-Month,date but how to put in the if else logic if(vday=1,vmonth=May,vday=31,vMonth=April)-Actually i'm trying in this way but no luck.Expecting solution as stated.

Highlighted

This doesn't seem like a good way, but may be this:

If(vday = 1 and vmonth = 'May' and vday = 31, 'April')

Highlighted
Contributor III
Contributor III

Sorry,I didn't explained in good way.I kept the expression for Understandable.

I'm expecting in dynamic way if every month start it should take the prior month last date.

Expecting in the multi conditional statement in a Text Object.

How can the above Scenario can be achieved?

Highlighted
Specialist
Specialist

=Month(MonthName(Today())-1)

Highlighted

Is there a sample you can share? I am not entirely sure how your data looks like

Highlighted
Specialist
Specialist

Hi

like this

=Date(MonthStart(Today())-1)

Highlighted
Contributor III
Contributor III

    On Open of the Document need to get the Year,Month.

Attached the sample,implemented the Triggers .

My Question is the Variable "vRefreshMonth = Month(Today() - 1)"

,will always give the expect result like below or is there any other way to achieve this

Refresh DateExpected DateExpected Month
4/19/20164/18/2016  Apr
5/1/2016          4/31/2016    Apr
5/2/20165/1/2016May