Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dateformat in Chart (End of Month)

Hey I have a chart with a month dimension which shows the following:

Jan Feb Mar Apr May Jun... etc.

Now, this chart is about the values at the end of the month. And i was thinking it would be more clear to change the dates to:

31/1 28/2 31/3 etc.

How can I change this in the chart?

3 Replies
swuehl
MVP
MVP

Maybe like this:

=Date(monthend(Date#('Jan','MMM')),'DD/MM')

replace 'Jan' with your Month field name.

I would probably create an additional field in the script, if possible, instead of a chart calculated dimension.

edit: And unless you also have Year information, too, above might give you wrong end of month for feb in leap years.

Not applicable
Author

I tried:

Day([Date]) &'/'& num(Month([Date]))                    as [DayMonth]

But I cant sort it in the chart.

Not applicable
Author

What would you recommend for leapyears? This works without leapyears.

Date(monthend(Date#(month([Date]),'MMM')),'DD/MM')                              as [DayMonth]