1 Reply Latest reply on May 6, 2015 7:55 AM by Simon Runc

# How do I create groups that allow me to select the now-grouped fields?

Hi there,

I'm looking at downloads by country. I have 10 countries, some of them fall into Regions (ie: The United States and Canada are part of a "North America" region I need to create) and some do not. I've read up on grouping, but I need to be able to select the US and Canada as individual countries as well. Finally, I need an "All" group which is a total of all of the countries.

For these 10 countries, here's what I hope to display:

APAC (Asia Pacific) - Australia, China, Hong Kong, Japan

EUR - France, Germany, Spain, UK

All - All 10 countries

France

German

Hong Kong

UK

US

How could I do this? I'm guessing something with parameters? Thank you all very much for any suggestions!

• ###### 1. Re: How do I create groups that allow me to select the now-grouped fields?

hi Lauren,

Yes you are right parameters are the way to go. I've also not used 'groups', but a formula to create your regions (this would probably better done as part of the data download, unless you only ever have these countries).

I've created your regions with the following formula

CASE [Country]

WHEN 'United States' THEN 'NA'

WHEN 'Australia' THEN 'APAC'

WHEN 'Japan' THEN 'APAC'

WHEN 'Hong Kong' THEN 'APAC'

WHEN 'China' THEN 'APAC'

WHEN 'France' THEN 'Europe'

WHEN 'United Kingdom' THEN 'Europe'

WHEN 'France' THEN 'Europe'

WHEN 'Spain' THEN 'Europe'

WHEN 'Germany' THEN 'Europe'

END

Then I've created a parameter, so you can select the level you want (with the options of 'All', 'Regions' or 'Country'. I've then made a calculated field which displays the level depending on the parameter selection, with the following formula

IF [Select Level] = 'All' THEN 'All'

ELSEIF [Select Level] = 'Regions' THEN [Regions]

ELSE [Country]

END

I can then bring this field into the Viz, and as the parameter changes so does the view level. Hope this is hat you are after