Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody,
I've got a load * inline instruction which created a table :
load * inline [
State,X,Y,Expression
France,1,1,Sum({$<Flag_France={'1'}>}Population)
Spain,1,2,Sum({$<Flag_Spain={'1'}>}Population)
Italia,1,3,Sum({$<Flag_Italia={'1'}>}Population)
];
This table contains 4 parameters I need to create a scatter chart :
State | X | Y | Expression |
France | 1 | 1 | Sum({$<Flag_France={'1'}>}Population) |
Spain | 1 | 2 | Sum({$<Flag_Spain={'1'}>}Population) |
Italia | 1 | 3 | Sum({$<Flag_Italia={'1'}>}Population) |
In properties I specified State on the Dimension Tab, Sum(X) to the x axis, Sum(Y) to the y axis and Sum(Expression) to the bubble size expression on the expression tab.
I think expression cannot be correctly read, because bubbles are visible but they doesn't return the right result. 3 bubbles are the same size and returns 0.
I've try de put the pick expression in expression like this : pick('$1',Sum({$<Flag_France={'1'}>}Population)) and put Sum($(Expression)) to bubble size but it returns 0.
Doas anyone could help me to find the right syntax ?
Regards,
Marine Le Trionnaire
See this discussion: Expressions in Fields
Hi,
It's OK if I use this :
if(
State = 'France', Sum({$<Flag_France={'1'}>}Population),
if(
State = 'Spain', Sum({$<Flag_Spain={'1'}>}Population),
if(
State='Italia', Sum({$<Flag_Italia={'1'}>}Population)
)
)
)
Or if I created 3 variables(FrancePopulation,SpainPopulation,ItaliaPopulation) in the script for the 3 expressions I can use :
if(
State = 'France',$(FrancePopulation),
if(
State = 'Spain', $(SpainPopulation),
if(
State='Italia', $(ItaliaPopulation)
)
)
)
But the only function couldn't be use in a scatter chart.
The expression is ok in a text box but there is a problem in a graph because bubbles are the same sizes.
if(
State = 'France', only({<ID={1}>}Expression1),
if(
State = 'Spain', only({<ID={2}>}Expression2),
if(
State ='Italia', only({<ID={3}>}Expression3)
)
)
)
Regards,
Marine Le Trionnaire
I think that's because you don't dollar expand it. Try:
if(
State = 'France', $(=only({<ID={1}>}Expression1)),
if(
State = 'Spain', $(=only({<ID={2}>}Expression2)),
if(
State ='Italia', $(=only({<ID={3}>}Expression3))
)
)
)
Thanks to your answer.
I tried the expression in scatter chart and in a text box.
This expression (=only({<ID={1}>}Expression1)) is Ok in a text box but it doesn't return the right value in the chart.
I wonder if it's not because in table there are several informations and may be only one information can be returned in this chart. This is the reason why it's ok when i'm using variables but it could be easier with a table which contains all expressions I need.
Regards,
Marine Le Trionnaire