Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
js96
Contributor II
Contributor II

Date in dimension for Line chart

Date column from SQL as a dimension in line chart results an expected chart figures (Picture 1). Whereas, the Timestamp Date column that's been reduced by 4 hours and then, converted to Date column doesn't result expected results. There are three lines in the chart. One Total and other two are splits. It should look like the 1st chart, even after conversion as below:

js96_0-1624645793275.png

js96_2-1624646779110.png

 

Note:

Dimension of Picture 1 : if([created_date]>'5/18/2021' AND [created_date] <'5/27/2021',[created_date])

Dimension of Picture 2: if(vDate )>'5/18/2021' AND (vDate )<'5/27/2021',(vDate ))

Where, vDate= Date(Timestamp(createdTimestamp-MakeTime(4)))

The expected conversion should make the x-axis start value from 5/19/2021 ( as timestamp reduced by four hours).

Appreciate the support. Thanks!

 

Labels (1)
2 Solutions

Accepted Solutions
js96
Contributor II
Contributor II
Author

Hi, Thankyou Ruben.:)

Unchecking Continuous option is actually is close to what I expected. But, it plots all the values of a particular date/time, which I don' want. Is there an option to aggregate the values of one date alone in x-axis?

js96_0-1624795013249.png

 

View solution in original post

rubenmarin

Hi, you can do a calculated dimension using Date(Floor(DateField)) or get better performance if you create a new field in script using the same sentence: Date(Floor(DateField)) as Date

View solution in original post

4 Replies
rubenmarin

Hi, if you are using a 'continuous' axis, Qlik decides the range of the values based on the zoom applied to the chart (zoom in or out with mouse wheel). If you remove the continuos option it will show the different values the field has, but maybe it doesn't looks as you want this way.

Make the test to unchek the continuous option to see how it shows.

js96
Contributor II
Contributor II
Author

Hi, Thankyou Ruben.:)

Unchecking Continuous option is actually is close to what I expected. But, it plots all the values of a particular date/time, which I don' want. Is there an option to aggregate the values of one date alone in x-axis?

js96_0-1624795013249.png

 

rubenmarin

Hi, you can do a calculated dimension using Date(Floor(DateField)) or get better performance if you create a new field in script using the same sentence: Date(Floor(DateField)) as Date

js96
Contributor II
Contributor II
Author

Hi Ruben, Thanks a lot! Its resolved now.:)