Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

right/left function - bug in Qlikview 11?

Hi,

On a chart dimension, the following problem occurs since I upgraded to Qlikview 11 SR1. It was displayed properly on Qlikview 10.

I have a dateString field that looks like this: 2012-05-22

This is what I see in my graphin Axis when I use the following dimension:

right(dateString,5)

righ_function_bug.png

Above is an example of what happens when I apply the right function to my string... I'm confused

Is it a know bug in Qlikview 11?

1 Solution

Accepted Solutions
Not applicable

Re: right/left function - bug in Qlikview 11?

I found a solution

timestamp4.png

Problem solved... but I still maintain that I didnt have to do that in Qlikview 10, grrrr.

Thanks for you help guys.

8 Replies
martinpohl
Valued Contributor II

right/left function - bug in Qlikview 11?

QV defines a date as a number as default.

So your script should be

load (right(text(datestring),5) as date

MVP
MVP

right/left function - bug in Qlikview 11?

Interesting...

Your dateString is of date or timestamp data type with a numerical representation, right? (You could check this in table view). It seems that the right function is applied to the numerical representation, not the textual.

But I would agree this is not the result I would expect and it seems to break existing coding.

I am just working on QV 11 IR at the moment, in this version it's returning the correct string part.

I am going to test on QV 11 SR1 later on.

Not applicable

right/left function - bug in Qlikview 11?

Yes, I think that's a bug.

dateString is a varchar hence a right([varchar],5) should give me the last 5 chars of the string...

And as I mentionned, it worked fine on Qlikview 10.

I just feel bad for people who might extensively use this function on dates and are going to upgrade... BEWARE!

I'm just going to replace dateString by Month&' '&Day... But both should have worked.

MVP
MVP

right/left function - bug in Qlikview 11?

I believe your dateString will automatically be parsed in as date type by QV (given the standard date format matches). You might want to check the date type in table view by hovering over the field to verify this.

And I believe Martin's suggested workaround should work also, but using date functions like Month and Day might be a good solution anyway.

Not applicable

Re: right/left function - bug in Qlikview 11?

I tried Martin's suggestion on the object itself:

timestamp2.png

It's just not working at all for a timestamp...

timestamp3.png

Note about this field, I load it using the from_unixtime function on an epoch time. Would that be the problem?

Not applicable

Re: right/left function - bug in Qlikview 11?

I found a solution

timestamp4.png

Problem solved... but I still maintain that I didnt have to do that in Qlikview 10, grrrr.

Thanks for you help guys.

MVP
MVP

right/left function - bug in Qlikview 11?

I would like to see the solution, but I can't open the image. Could you please double check the link? Or post the code you used to transform the data?

Not applicable

Re: right/left function - bug in Qlikview 11?

Sorry, I reuploaded the screenshot.

Community Browser