Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

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
Valued Contributor III

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

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

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

5 Replies
jvitantonio
Valued Contributor III

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

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

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

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
Valued Contributor III

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

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
Valued Contributor III

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

Here's an example:

Not applicable

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

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.

Community Browser