6 Replies Latest reply: Jan 3, 2016 9:20 AM by Peter Cammaert

# char table with calculated dimonsion

hi all,and happy new years,

i hve this script

from ..

in the chart table i used for the first dimension the contry, in the expresssion i used the sum(sales),

my prob is: i want to use a calculate dimension for all contries that start by 'a' that's all ,i want to display only calculated values,

but it doesn't work can anyone help me please

• ###### Re: char table with calculated dimonsion

Hi,

If you are only trying to show values for the countries that start with a, then you can do it with set analysis:

Sum({<country={"=WildMatch(country, 'a*')"}>}Sales)

This only calculates sum of sales for the countries that start with a.

Hope this helps.

• ###### Re: char table with calculated dimonsion

Or another way to show only countries that start with a in a calculated dimension is:

If(WildMatch(country, 'a*'), country)

Hope this helps.

• ###### Re: char table with calculated dimonsion

this is just an exemple to do it in my script ,

how i can inject a lotof condition in your expression like :

Only({<sales ={">0"},ID ={'id1','id2','id3'},typeDocument -={'d1','d2','d3'}, PR-={'PE'},type -= {''}>}Document)

thanks

• ###### Re: char table with calculated dimonsion

You won't need a calculated dimension, you can do this using a set analysis expression with a simple search like this:

=Sum({<contry={'a*'}>}Sales)

Set analysis restricts expression outcome to the dimension values you want by reducing the total data set for this object to just the countries whose names start with an 'a'.

Best,

Peter

• ###### Re: char table with calculated dimonsion

i used this exporession, in the seconed  column of slaes (column of expression) ,, it get it perfectly but it gets all values of the first dimonsion  and it put '-'  in the countries that  doesn't start by 'a' ,

the first column :

i used this scripts :

=Only({<contry={'a*'}>}country)

the second:

=sum({<contry={'a*'}>}Sales)

• ###### Re: char table with calculated dimonsion

As I said, you won't need a calculated dimension. Change the calculated dimension back into a simple field name, e.g. contry.

Expressions have a default setting that 0 and NULL values should be suppressed. Leave that setting as is. Since your expression with set analysis will only produce results for countries that start with an 'a', all other countries will be suppressed.