Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
in a straight table I'd like to compare a row data with its year-previuos data.
Tha table contains a Year and an amount: the amount is calculates as Sum (prices).
I'd like to set the amount cells foreground color as red if the data of one year are less then the previous year ones, so I need a formula to set the background cells.
It should be something like this:
If (Sum(price)>Sum( <????> price), RBG(0,128,0),RGB(255,0,0))
Should anybody help me to set the right formula?
Thank you.
N.
You can use the above() function get a value from the previous row in a table.
If (Sum(price)>above(Sum(price)), RBG(0,128,0),RGB(255,0,0))
You can use the above() function get a value from the previous row in a table.
If (Sum(price)>above(Sum(price)), RBG(0,128,0),RGB(255,0,0))
Try something like below in the expression for background color:
if(sum(price) > above(aggr(sum(price),Year)),RGB(0,128,0),RGB(255,0,0))
Thanks,
Singh
Sorry...i can't mark both your answers as "right answer", so i chose the first one.
Thank you to everybody 🙂
N.
You chose the right one as correct.
Gysbert Wassenaar.. is from whom I am learning