Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
dcd123456
Creator
Creator

Problem with month order in bar chart

Hello

I have a bar chart, i need to put the month of the year as dimension, in the data i have the date field and so i define a calculated dimension as year(H_MFECHA)&month(H_MFECHA).

The problem is that i have data from 03/2013 to 02/2014 and QV show in the bar chart 04/2013 as first month and 03/2013 as last month.

I attached an example.

thanks

regards

diego

14 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Use this as dimension:

=year(H_MFECHA)*100+month(H_MFECHA)

rustyfishbones
Master II
Master II

Hi,

Have you tried using changing the month to a number, like

2014-02-27_0922.png

and the use the SORT by numeric

2014-02-27_0924.png

rustyfishbones
Master II
Master II

Sorry, I have noticed an issue with that.

Alessandro seems to have the correct Answer!

mvanlutterveld
Partner - Creator II
Partner - Creator II

Hi Diego,

Add next line to your script and use the field YearMonth as the dimension of the graph.

     Date(MonthStart(H_MFECHA),'YYYYMMM') as YearMonth



    
Regards,

Michiel

Not applicable

use monthname() function

CELAMBARASAN
Partner - Champion
Partner - Champion

To resolve in a chart

Add the below as dimension

=Date(MonthStart(H_MFECHA), 'YYYYMMM')

Set sort order Numeric as ascending

To do it in script is better choice

PrashantSangle

Hi,

use monthname(H_MFECHA) as your dimension.

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
dcd123456
Creator
Creator
Author

hello

with the dimension as =year(H_MFECHA)*100+month(H_MFECHA), the order of the month is correct but the display is like 201303 201304... it is possible to display the month like 2013mar 2013Apr  ??

Thanks in advance for your help

regards

diego

dcd123456
Creator
Creator
Author

Hello

with monthname(H_MFECHA) and =Date(MonthStart(H_MFECHA), 'YYYYMMM'), the order is not correct, mar2013 is the last month instead the first.

thanks

regards

diego