Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
how to write in pivot table if sum(sales) > total sales then green() else red(). I wrote in background color section as if(sum(sales)<sum(total sales),red(),green()) but not getting correct result
chart screenshot posted at above reply
Hi,@venky77777
You need to adjust your code for the total by its dimension, in your expression the sum takes the total regardless of the city category, for this you need to specify the dimension between <dimension>:
See if this is correct:
if(dimensionality()=1, if(sum(sales)<sum(total <city>sales),red(),green()))
Regarts, Matheus
@venky77777 You are not getting colors on the Total line because your expression is not setting values for dimensionality=0
if(dimensionality()=1, if(sum(sales)<sum(total sales),red(),green()) /* Dimensionality=0 has nothing */)
Can you check the values of sum(sales) and sum(total sales) by making them separate columns. I bet they are equal. Also, I'm trying to understand the columns del and hyd and how it's interacting.
thanks, that's worked on table. here it is..
Thanks for reply, got result by applying @MatheusC suggested expression