Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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.

1 Solution

Accepted Solutions
Not applicable
Author

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

thanks

View solution in original post

15 Replies
salto
Specialist II
Specialist II

Hello,

Maybe you should try ordering the Week  dimension in the chart, by ascending numeric values (in the "Ordering" tab of the chart).

Hope this helps.

Not applicable
Author

Thanks for you quick reply, bu i have tried this option too but its not working,

i have written expression as

Sum({$<Week = {">=$(=vMinWeek)<=$(=vMaxWeek)"}>} Qty),''),

where vMaxWeek is max(Week)  and vMinWeek is "max(week) -26"

which is not working.

sundarakumar
Specialist II
Specialist II

can u post some sample data or app???

salto
Specialist II
Specialist II

Hello,

if the week is a dimension in your data model, maybe the solution is easier.

Set the dimension to Week and set the expression to sum (Qty)

Does this make any sense?

Not applicable
Author

Hi Aasif,

Assuming that you are using Week as the dimension then maybe you could try

Sum({<Week = {">=$(=max(Week)-25)<=$(=max(Week))"}>} Qty)


Hope this helps.


Cheers,

Tyler

jagan
Luminary Alumni
Luminary Alumni

Hi Aasif,

Try like this

Use your week as dimension and use the following as expression, if you have any date dimension in your data model

=Sum({<MonthDimensionName=, WeekDimensionName=, YearDimensionName=, QuarterDimensionName=, DateDimensionName = {'>=$(=WeekStart(Max(DateDimensionName), -25))<=$(=WeekEnd(Max(DateDimensionName)))'}>} MeasureName)

Here we are controlling the dimensional values with the expression, always you will get the last 26 weeks.

Regards,

Jagan.

Not applicable
Author

Hi,

attached here is sample file,

I need to display last 26 weeks starting from week(201313) to (201348).

week must be in sorted ascending numeric and all 26 weeks should me displayed

thanks and regards.

salto
Specialist II
Specialist II

Is this what you are looking for? Note that the scrollbar appears:

Imagen 5.png

Not applicable
Author

Hi Aasif,

Please find attached, there aren't 26 values in the chart since it looks like you don't have values for some of the weeks, if you want to get the last 26 weekly values then you would probably be best served doing that in your script.

Cheers,

Tyler