12 Replies Latest reply on Feb 26, 2015 1:28 AM by juliette.mccormack

# How to show only 10 countries in bar graph?

Hello All,

I have 241 Countries and some amount related to each country. I want to show only 10 countries on bar graph. When I will slide the parameter then next 10 countries should display(but it should show only 10 countries on graph) and so on till 241 countries are finished.

I am attaching sample excel sheet for the reference which has data and values.

Thanks & Regards,

• ###### 1. Re: How to show only 10 countries in bar graph?

Hi Piyush

The attached uses the countries alphabetical position.

On the right hand side you can amend the filter to take 1-10, 11-20, 35-69 whatever your end user wants.

if you wanted it based on a different field/ category let me know and we can do it another way

Cheers

Mark

• ###### 2. Re: How to show only 10 countries in bar graph?

Hi Mark,

Thanks & Regards,

• ###### 3. Re: How to show only 10 countries in bar graph?

You're welcome, happy to help.

Cheers

Mark

• ###### 4. Re: How to show only 10 countries in bar graph?

Building on from Mark's idea, perhaps you could create bins and then your slider would move through the bins.  This way you wouldn't have to move the lower slider up as well as the upper one.

BW

Juliette

• ###### 5. Re: How to show only 10 countries in bar graph?

Hi Juliette

What a neat solution!

I'm now thinking where I can use this technique in my own workbooks

Thank you for sharing

Mark

1 of 1 people found this helpful
• ###### 6. Re: How to show only 10 countries in bar graph?

Hi Juliette

Agreed with Mark, Its a really neat solutions.

Thanks for giving a out of a box solution. It was really helpful.

Regards,

Piyush

• ###### 7. Re: How to show only 10 countries in bar graph?

Hello Juliette,

Can we Slide the country only by one position?

If there are 10 Countries on graph, When i Slide the slider the second country on the graph must be my 1st Country and when I slide again the 3rd Country now must be the first country this time and so on?

Thanks & Regards,

• ###### 8. Re: How to show only 10 countries in bar graph?

Hi Piyush

You can slide by one position (see attached workbook).

In order to have a slider parameter, I've had to set a range - you've got 241 countries and I've set the range to be 1 - 250 to allow for a few others you might add.  You'd have to keep and eye on that if your data was expanding.  Someone may be able to suggest another way of doing that.

BW

Juliette

• ###### 9. Re: How to show only 10 countries in bar graph?

Thank-you Juliette for your quick response on my query.

Can we not use filter instead of Parameter? Because problem what I am facing is, parameter do not provide sliding button. Like in the following image [<][>]. It is only available on quick filters not on parameters.

Regards,

Piyush

• ###### 10. Re: How to show only 10 countries in bar graph?

I don't believe we can use a filter in this case.  The parameter is setting the starting point for calculating which countries are to be included in the chart.  It's not actually doing any filtering - that comes a bit later on in the process.

I'm not sure why Tableau's been developed so that the two sliders look different but I think you'll have to make do with the parameter slider unless someone else can think of a workaround.

BW

Juliette

• ###### 11. Re: How to show only 10 countries in bar graph?

Juliette,

Change the "Step Size" of the parameter to 10 for example ...

and the slider becomes more like what Piyush is looking for...

Every click on the > arrow will move the number by 10, so the next range of countries will be 11 to 20.

Hope this helps

• ###### 12. Re: How to show only 10 countries in bar graph?

Hi Christopher.

Many thanks for highlighting that.

By using the step feature in the parameter he does get the slider bar he would like to see he loses the functionality he requested in previous post which suggested that he wanted to move the slider by one each time, so countries 1 - 10 show and then 2 - 11 and then 3 - 12, etc.  So far, I think Piyush got to make the decision between one or the other.

Best wishes

Juliette