Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
sunny_talwar

Yes that is what it will give you.

vRefreshMonth = Month(Today() - 1)

vRefreshDate = Date(Today() - 1)

View solution in original post

10 Replies
sunny_talwar

May be this:

vRefreshMonth = Month(Today() - 1)

or for date

vRefreshDate = Date(Today() - 1)

Chanty4u
MVP
MVP

or

=date(urdate-1)


or


=Date(Today()-1)

Anonymous
Not applicable
Author

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.

sunny_talwar

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

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

Anonymous
Not applicable
Author

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?

Anonymous
Not applicable
Author

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

sunny_talwar

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

Anonymous
Not applicable
Author

Hi

like this

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

Anonymous
Not applicable
Author

    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