Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everybody,
I want to change the color in bar chart as the following :
Red for the higher value and Green for the lower value
So, under bar chart properties >> Expressions >> "+" >> Background Color >> Definition I(ve written this :
if(data%Table-above(data%Table)=max(data%Table-above(data%Table)),LightRed()) but It doesn't work
However, if I write this :
if(data%Table-above(data%Table)=23,LightRed()) it works
Do you know what is wrong with max function ?
Thank you
In teh expression of the Background colour setting of your expression use the 'rank()' function to determine the top and bottom values and assign the colours required in much the same way as your initial example.
This method works for me and you don't need to get bogged down in variables.
Something along the lines of (unchecked):
=if(rank(Sum(Sales))=1,rgb(198,255,198),if(ranksum(Sales),4)=1,rgb(255,198,198),rgb(255,255,255)))
If you get stuck have a look in the help file.
Hope that helps,
Matt - Visual Analytics Ltd
Dear jeremy02,
first calculate the max function and store the value in a variable and then apply your expression.
I hope that might work.
TC 🙂
Hi Sushi,
First, thank you to help me.
As you told me I have to do the following :
max_value = max(data%Table-above(data%Table))
if data%Table-above(data%Table)= max_value, lighred()
My question is to know where to do the first line ? Because I think that we can just add 1 expression at the same time no ?
ok the problem is that the expression "data%table - above(data%table)" return nothing
How can I get a field with this : NewField = Field(i) - Filed(i-1)
Thank you
Good Morning Everybody,
I've a field with counter number (for example Index) :
Index
123
160
176
180
250
If I do : "Variable = Max(Index)" I get 250 this is ok but if I do "Above(Index)" I get :
Above(Index)
-
123
160
176
180
250
and Max(Above(Index)) returns this '-'
The aim is to make a difference between Index and Above(Index)
Thank you
In teh expression of the Background colour setting of your expression use the 'rank()' function to determine the top and bottom values and assign the colours required in much the same way as your initial example.
This method works for me and you don't need to get bogged down in variables.
Something along the lines of (unchecked):
=if(rank(Sum(Sales))=1,rgb(198,255,198),if(ranksum(Sales),4)=1,rgb(255,198,198),rgb(255,255,255)))
If you get stuck have a look in the help file.
Hope that helps,
Matt - Visual Analytics Ltd