Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna20
Specialist II
Specialist II

Date Problem

Hi Folks,

I'm facing a strange problem not able to troubleshoot it where the mistake is.

In my dashboard i'm showing last three years in list box, under that showing calendar objects from selecting the data range.

My requirement is in on active sheet max year should select in listbox and in the From calendar, Date(Yearstart(Max(Date_Field))) to be selected and in the To Calendar Date(Addmonths(Max(Date_Field),0)) need to select .

If i select 2014 , the calendar object should change from 01/01.2014 to 31/12/2014 dynamically.

The above one i achieved. The problem is , the above task i achieved in my personal desktop. When i'm trying to do the same thing in the client's server it's not working. Each and every variable i did a copy & paste. But, it's not  working.

Qlikview i'm using personally is 11.20 SR10

My Clients Qlikview is 11.20 SR5

Is this the problem?or anything.Please suggest me .

Regards

Krishna

27 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

The answer is NO. YearStart() is a rounding function, just like all the other XxxxStart() functions. For example:

text(YearStart(TimeStamp(41882.5))) = 1/01/2014

num(YearStart(TimeStamp(41882.5))) = 41640

Unless I'm making a fundamental mistake here (which is perfectly possible), this outcome is entirely predictable. Date(YearStart()) being off by a day would be ridiculous.

But I didn't invent/discover this myself. I'm just paraphrasing another of your highly esteemed colleagues. See his blog post The Date Function

Best,

Peter

ToniKautto
Employee
Employee

I stand correct. My bad, I really should not be online too late in the evenings.

I was completely thinking if a customer scenario where MonthEnd() was used. In that case the return value is a decimal and the floating point variation can lead to issues. For MonthStart() and YearStart() the expected outcome is a integer, even though the label looks like a timestamp.

EDIT: I removed my previous entry to minimize any misleading replies.

ToniKautto
Employee
Employee

The document you have provided all behave as expected, in SR11 and SR5. As morganaaron‌ pointed out the actions refer to selecting a field that does not exist.

The difference between your samples is that in SR5 you correctly set a variable value, while in SR11 you try to set a field value.

2015-05-18 08_56_12-Actions.png

2015-05-18 08_55_44-Actions.png

krishna20
Specialist II
Specialist II
Author

Hi Tony,

Thank you very much for finding that mistake. When i selected the year in list box. The value is not changing in the calendar object  after changing the triggers to set variable also.

ToniKautto
Employee
Employee

If that means the issue is resolved, please remember to mark helpful and correct answers to show appreciation for everyone time and to show the community if you need more input.

krishna20
Specialist II
Specialist II
Author

I never missed in appreciating our community members tony.

Sorry, yet my issue is not resolved.

Please , refer my actual question and suggest me. I don't know whether i'm facing SR's issue .Still it's not working in SR5 app.

ToniKautto
Employee
Employee

Unfortunately I do not have more time to look at your samples today, but form what I remember the two files where not identical in set up. My assumption is that your file will work when it has been setup identically.

krishna20
Specialist II
Specialist II
Author

Still same output..But Thanks to all for your suggestions..