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: 
Not applicable

Values not being grouped on dimension

Why would the dimension values on my chart not be being grouped together fully?

I have a very simple setup, with one data table and one calendar table with one common date field

repeated values on dimension.bmp

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I suspect that your date dimension is actually timestamp (date + time) formatted as date.  Try to fix it in the script using

date(floor("date field")) as "date field"

It will remove the time part.

View solution in original post

6 Replies
Roop
Specialist
Specialist

I need more information.

is it the sort order that is incorrect?

Thanks

whiteline
Master II
Master II

Hi.

I guess because there is a time part in each period.

So numeric representation of each value is not the same.

Use floor() function to omit the time part:

=Date(floor(Period), 'DD/MMM/YY')

Anonymous
Not applicable
Author

I suspect that your date dimension is actually timestamp (date + time) formatted as date.  Try to fix it in the script using

date(floor("date field")) as "date field"

It will remove the time part.

Roop
Specialist
Specialist

It appears as though your date field also contains the time (although it is not possible to see it). Change the value to a date excluding time using floor.

Not applicable
Author

Awesome. Thanks guys

I'm a bit of a beginner at this and was tearing my hair out!

All working now

MarcoWedel

Hi Alex,

other methods (calculated dimensions):

=Date#(Date(Timestampfield, 'DD/MMM/YY'), 'DD/MMM/YY')

or

=MakeDate(Year(Timestampfield), Month(Timestampfield), Day(Timestampfield))

or

=Date#(Left(Timestampfield, 9), 'DD/MMM/YY')

regards

Marco