Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sort issue with bar chart and display results in "=Day & ' - ' & Month"

My default date format = DD-MMM-YYYY (01-Jan-2010.

I Have a Calendermaster table with:

%Calenderday (DD-MMM-YYYY)

Year

Month (Jan-Dec)

Week

Day

Now i want to show my result in a bar chart with "=Day & ' - ' & Month" between a date. This is working so far. But now i have a problem with Sorting the results.

On default i get these results:

1.jpg

i tried expression sorting on "=Day".

This works when there is not a bigger timespan selected then 1 month. But when there are more months selected, you see the results like this

2.jpg

I also tried sorting on "=Day & ' - ' & Month" But then i get results like this

3.jpg

I even tried sorting on %Calenderday. But then the results look like this

4.jpg

Some advice is welcome here

Thanks a lot!

1 Solution

Accepted Solutions
jvitantonio
Luminary Alumni
Luminary Alumni

No because you concatenate 2 fields and this is no longer a date field,. You can try

date(makedate(Year, Month, Day) , 'DD-MMM')

View solution in original post

5 Replies
jvitantonio
Luminary Alumni
Luminary Alumni

Hi, please create a new filed in your script like this:

date(%Calenderday, 'DD-MMM') as DayMonth

You this in your charts and order by this field.

Hope this helps.

Not applicable
Author

I know this would be a solution. But is there no other way then alter my datamodel or add code to my current report?

jvitantonio
Luminary Alumni
Luminary Alumni

No because you concatenate 2 fields and this is no longer a date field,. You can try

date(makedate(Year, Month, Day) , 'DD-MMM')

jvitantonio
Luminary Alumni
Luminary Alumni

Here's an example:

Not applicable
Author

Thanks a lot! This trick Seems to do it. But the performance goes down a lot.

So i have changed my Datamodel instead with your first solution. Seems to be faster.