Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Customers, Partners & Luminaries only: You're invited to a Data Analytics Roadmap session. Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP
MVP

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
Highlighted
Partner
Partner

hi 

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

Highlighted
MVP
MVP

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

Highlighted
Contributor
Contributor

Hi Kush:

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

Regards