Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
Is it possible to filter which dimensions are displayed in a bar chart?
E.g. I have a dimension which is on locations. The dimension is called location. There are four areas in the data when the chart is created - England Scotland Wales Ireland. I only want to display England and Ireland. How do I do This?
Thanks
As dimension of your bar chart :
=if(match(location,'England','Ireland')>0,location)
and check suppress null values
Or as expression :
sum({<location={"England","Ireland"}>}Indicator)
Hello thank you for your reply. This does work but it doesn't keep the labels on the bar chart and replaces these with the if statement expression. Is there a way to override this so you are able to filter the dimension and keep the labels so it says England and Ireland instead? Thank you
For dimension, you can write label in Properties/Dimension tab

And for expression

Hi Sara
Just do this:
1) in the load script, create a table INLINE with the dimensions that you want, like this:
[Location Options]:
LOAD * INLINE[
"_location_option"
"England"
"Scotland"
"Wales"
"Ireland"
];
2) Run The script
3) In the chart, do the following:
Property
Expressions
3.1) in a [England] expression:
marks the conditional checkbox and write a condition :
=( GetFieldSelections(_location_option) like '*England*' )
3.2) in a expression definition, use a modifier:
LOCATION={'ENGLAND'}
4) For example, if user select England and Scotland only, you chart appears like this:

Sarah,
I would suggest to use sergio0592 second option using the set analysis statement. The calculated dimension can cause issues if you are working with a larger data set. If you are dealing with a small data set then you will not really notice a difference in response time and using a calculated dimension will be fine.
Good luck
Oscar
Excellent answer thank you so much. Just tried it and it works. Perfectly described. Great instructions.