Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Vern2022
Contributor III
Contributor III

Graph not scaling properly, showing years that are not in the dataset

Hi all,

I having some difficulty with a scatter plot and scaling it properly. X-axis is numeric and the Y-axis is post to be time stamp. I thought the issue in-relation to time stamp was the fact there was minutes included with the data but I have done this:

date(SheetOne.LastReload, 'YYYY-MM-DD')

And it shows years now that are not even in the data set. The current format for the time stamp data is YYYY-MM-DD MM:SS. And id doesn't appear the numbers are the wrong way round. 

There are 0 values on the x-axis, however, I thought I dealt with these correctly by doing this:

IF(isnull([Session Duration in Minutes]),'0',[Session Duration in Minutes]) as [Session Duration in Minutes] 

Why is my graph displaying years that don't exist in the dataset? Think back to any similar issues that you may have had yourself, it might be nothing to do with the code or anything else. I am new to Qliksense so these are just things I think might be causing the issue.

Many thanks in advance.

 

 

 

4 Replies
Kayde_72
Contributor III
Contributor III

It could be interpreting a field you have data in as a date field, or its possible that you are using the wrong date format in the code and need to convert to something else. 

I use this formula below to get dates back into how they should be viewed

Date((num#(monthyear)), 'MM-YYYY') as date

 you could also test it by putting your dates in a table with your key and seeing if it shows the timespan you are thinking it would, if it doesn't then its a format issue. If the times are accurate its a formula issue with the chart

Vern2022
Contributor III
Contributor III
Author

Hi Kayde_72,

Your syntax made the data un-displayable all together, even in the table. I am telling you in case this indicates something.

The data does display in the table as it should when I attempt no formatting.

When I just load that field without attempting any formatting I get a "The chart is un-displayable because it contains only undefined values". Does this indicate anything? I don't understand how the values can be undefined when they display without issues in the table.

 

What is the key? How does the Primary Key effect this? And how do I correct this with a formula.

Many thanks, Kayde_72

 

  

Kayde_72
Contributor III
Contributor III

On the back end in the data load viewer, how is date field being pulled into Qlik?

Date((num#(monthyear)), 'MM-YYYY') as date

That is what the code above is for^ to go back into the coding and reformate it before it hits the sheets. if you did that already and that is what you are talk about lemme know and we can go into next possibilities

 

Kayde_72
Contributor III
Contributor III

If you are talking about the date field, it could be in a format that qlik cannot read with the timestamps. Possibly create two different sets of dates. one that has the date rounded in days and the other as the timestamp. then use the days one for charts