Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
aminqlik
Contributor
Contributor

Convert the numeric format to yyyy-ww

Hi All:

     I have the initial numeric format as below.

aminqlik_0-1598276557210.png

    Then, I used the Weekname function to get the table as below:

aminqlik_1-1598276640828.png

when I put the year week as dimension, the time sequence is wrong.

aminqlik_2-1598276749986.png

Can anyone help me to fix it?

Regards,

aminqlik

1 Solution

Accepted Solutions
Kushal_Chawda

You need to have a numeric value associated with year week. Use dual function to assign numeric value to year week.

Assuming that you have calculated  year week as year(Date)&'\'&week(Date)  where Date is your numeric value field. You can now create year week as below

=dual ( year(Date)&'\'&week(Date) , weekstart(floor(Date))

Now you can sort the your week dimension from chart properties

View solution in original post

3 Replies
lironbaram
Partner - Master III
Partner - Master III

hi 

when you look at the chart properties what is the first element is the sorting tab?

Kushal_Chawda

You need to have a numeric value associated with year week. Use dual function to assign numeric value to year week.

Assuming that you have calculated  year week as year(Date)&'\'&week(Date)  where Date is your numeric value field. You can now create year week as below

=dual ( year(Date)&'\'&week(Date) , weekstart(floor(Date))

Now you can sort the your week dimension from chart properties

aminqlik
Contributor
Contributor
Author

Hi Kush:

     Thank you very much for the solution. It runs well.

Regards