Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
richard_chilvers
Specialist
Specialist

Restrict How Many Shown on X-Axis

I have a chart where the week number is the x-axis, and I wish to show the most recent 10 weeks.

I would usually do this by using a calculated dimension to restrict to 10 weeks, but my expressions use calculations which go back more than 10 weeks.

I hoped to use Dimension Limits, but it seems I can show the First 10 values, but there's no option to show the Last 10.

Any ideas are welcome.

10 Replies
sunny_talwar

You can continue to use First, but change the sort (if it is ascending, then make it descending and vice versa) and the last 10 should be visible. Here is from the help page of QV.

Capture.PNG

HTH

Best,

Sunny

giakoum
Partner - Master II
Partner - Master II

Hi Richard.

in dimension limits you can use the largest option, and have week as you first expression. This way you will only show the latest 10 weeks.

Dimension limits are applied on the first expression.

richard_chilvers
Specialist
Specialist
Author

Hi

Thanks - I understand better now how the limit works. I have taken your advice, and it does show me only the values along the x-axis (dimension). Unfortunately, my expression values are then incorrect - p[perhaps this is because I use RangeSum() and my range goes beyond the restricted dimension limit ?

sunny_talwar

Are you using above function with RangeSum()?? If you are, then you might have to switch Above() with Below() because the sorting changed now.

martinpohl
Partner - Master
Partner - Master

How about

"Properties/Presentation/Chart Scrolling -> enable X-Axis Scrollbar ?

Regards

richard_chilvers
Specialist
Specialist
Author

Hi

Yes, I'm using RangeSum() with Above().

But Week is my first expression, and therefore the one used by the Dimension Limits, so I can choose to limit the Largest 10 values, without changing my sort sequence.

However, it isn't showing the correct results, so I do think my range is affected by the dimension limit

richard_chilvers
Specialist
Specialist
Author

Thanks - a good idea, but I don't want to offer the scrolling feature.

sunny_talwar

Not sure I understand completely. Do you have a sample you can share?

richard_chilvers
Specialist
Specialist
Author

My table (currently) has rows for weeks 1- 28.

My expression use RangeSum to add the values for the week and the previous 9 weeks.

So for week 28, the value is the sum of weeks 28-19.

I can use dimension limits to show 10 weeks of values, ie. weeks 28-19. But it appears that the Range expression value is incorrect because of the 'missing weeks' ie.

Week 27 value is the sum of weeks 27-19,

Week 26 value is the sum of weeks 26-19,

Week 25 value is the sum of weeks 25-19   etc.