Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
danialier
Creator III
Creator III

Add Calculated Dimension...

Hello,

I have a Grid Chart displaying countries (x axis) and I want to show in the y axis the revenues.

For that reason I tried to add a new dimension by clicking the "Add Calculated Dimension..." in the 'Dimensions" tab. Then, in the edit expression I entered "=sum(Revenues)".

However in the Grid Chart an error message says"//Error in calculated dimension"

I don't know what I'm doing wrong...

Please help.

BR,

dani

1 Solution

Accepted Solutions
Gysbert_Wassenaar

sum(revenues) will only return one value, not a list of values. You'll have to use the aggr function to aggregate the sum over one or more dimensions. Something like =agg(sum(revenues),CountryName). Or perhaps you want to create buckets of revenue. In that case you can use the Class function: =class(sum(revenues),1000)


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

sum(revenues) will only return one value, not a list of values. You'll have to use the aggr function to aggregate the sum over one or more dimensions. Something like =agg(sum(revenues),CountryName). Or perhaps you want to create buckets of revenue. In that case you can use the Class function: =class(sum(revenues),1000)


talk is cheap, supply exceeds demand
richard_chilvers
Specialist
Specialist

Perhaps you don't need a grid chart ? If you simply want to show total revenue for each country, try starting with a bar chart. A grid chart usually has 2 dimensions and an expression.