Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Sorting by Date

Hi,

I need an help for a sorting problem.
The records is composed by lots of timestamp in the format 'DD/MM/YYYY hh:mm:ss[.fff]' called DataAggiornamentoOp.
I want to create a linechart with this dimension

day(timestamp(DataAggiornamentoOp)) &'-'& month(timestamp(DataAggiornamentoOp))&'-'& year(timestamp(DataAggiornamentoOp))

but I can't order the x-axis with the date, because of qlik understand this dimension like a "Text Field".

I can I solve this problem?

Tags (1)
1 Solution

Accepted Solutions
Employee
Employee

Re: Sorting by Date

If the data is loaded properly as a timestamp, you need to convert the underlying numerical value to a integer. This is done by using the Floor() function on the timestamp.

Date(Floor(DataAggiornamentoOp), 'DD-MM-YYYY')

It is recommended that yo add this as a new field to the data model, so that you only have to prepare the data during reload.

4 Replies

Re: Sorting by Date

May be change your dimension to this:

Date(Floor(DataAggiornamentoOp), 'DD-MM-YYYY')

Update: Added the Floor based on Toni's response (Thanks Toni for pointing out my mistake)

Not applicable

Re: Sorting by Date

I try every kind of transformation, but the problem is in the grouping of the linechart. When the timestamp data are aggregated (there is lots of data on a single date), the chart show the result correctly, but the x-axis become a string, and I can't select a correct sorting personalization

Employee
Employee

Re: Sorting by Date

If the data is loaded properly as a timestamp, you need to convert the underlying numerical value to a integer. This is done by using the Floor() function on the timestamp.

Date(Floor(DataAggiornamentoOp), 'DD-MM-YYYY')

It is recommended that yo add this as a new field to the data model, so that you only have to prepare the data during reload.

Not applicable

Re: Sorting by Date

Perfcet, thanks Toni!

Community Browser