Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

convert monthname issue

i have a barchart:

dimension : yearmonth (201001)

expression : sum(value).

how i want to change the values that the end users see in dimension --> jan-2010

therefor i use a different dimension (monthyear).. only problem is the sorting.

i have changed in the sorting tab into an expression sort : yearmonth.

this works on 1 machine but not on the other one .. and i dont know why.

or perhaps someone has a different solution?

Labels (1)
1 Solution

Accepted Solutions
Not applicable

Hi Amien

I'm not sure exactly how you want it, but you can convert the date to Qlikviews native Date-format like this:

Num(Date#(201001, 'YYYYMM')) = "40179"


And then work with the native date to get your Jan-2010 format.

Normal 0 false false false MicrosoftInternetExplorer4

Date(40179, 'MMM-YYYY') = "jan-2010"

View solution in original post

3 Replies
Not applicable

Hi Amien

I'm not sure exactly how you want it, but you can convert the date to Qlikviews native Date-format like this:

Num(Date#(201001, 'YYYYMM')) = "40179"


And then work with the native date to get your Jan-2010 format.

Normal 0 false false false MicrosoftInternetExplorer4

Date(40179, 'MMM-YYYY') = "jan-2010"

mazacini
Creator III
Creator III

Hi Amien

Let me preface my remarks by pointing out that I am a newbie, but I thought I might pass on a solution I found in the forums to a similar problem I had.

I had a month field (PERIODCODE) in the same format as yours. I inserted an inline table early on in my script. PERIODCODE, YEAR, MONTHNO, and sorted in month order. My MONTHNO was an integer from 1 to 12. I assume you could replace with mmm-yy.

This would seem manageable as long as you are not dealing with too many years.

Joe

amien
Specialist
Specialist
Author

Thanks