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: 
Not applicable

Display set of weeks on x axis

Hey techies,

I am trying to display a set of last 26 weeks on x axis irrespective of its values, but if i take largest 26 weeks in dimension limits it takes weeks largest based on values, can someone please suggest me how to overcome this issue,

thanks.

15 Replies
salto
Specialist II
Specialist II

PFA.

Not applicable
Author

It seems looking fine let me check and apply this on my qvw file.

thanks

Not applicable
Author

Thanks,

it seems looking correct answer for me,

let me check it on my file,

Not applicable
Author

Hi There,

thanks for your help in resolving the issue but now there is some complications arise,

Its working fine with the weeks of same year but as year changes its not working.

please find attachment.

kindly suggest any logic or code to resolve this issue.

Thanks

jagan
Luminary Alumni
Luminary Alumni

Hi,

You need to arrive a date field in script and should use the set analysis expression

Data:

LOAD

     WeekNumber,

     Quantity,

     MakeWeekDate(Left(, 4), Num(Right(WeekNumber, 2))) AS Date

FROM DataSource;

Use weeknumber as dimension and use this expression

=Sum({<WeekNumber=, Date= {'>=$(=WeekStart(Max(Date), -25))<=$(=WeekEnd(Max(Date)))'}>} MeasureName)


Hope this helps you.


Regards,

Jagan.

Not applicable
Author

Hi All,

Thanks for all your support,

This issue has been resolved using 'Autonumber()' to weeks based on which we can sort and take desired no of weeks.

Thanks a lot