Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have two measures, Test and Compare. I want to change the color of my chart based on whether Test>Compare or not. However there are some null values in Test.
My expression if(sum(Test)>sum(Compare),red(),green()) does not work because of the null values in Test. Is there a way to add the null condition into my if statement?
Thanks.
You may be able to something like this?
If(Len(Trim(Sum(Test))) = 0, Blue(), If(Sum(Test) > Sum(Compare), Red(), Green())
Best,
Sunny
what is dimension and expressions in your chart?
Test and Compare are both measures in my chart. Name is the dimension.
Hi Sunny I tried this but it did not work...
Can you share a sample or show screenshots?
You mean to say...
Dimension
Name
Expression
SUM or COUNT or some function (Test)
and SUM(Compare)
You want to change color of both chart?
kindly clarify on this!
nulls should be treated as zero by sum(). What happens if you put sum(Test) in a text object?
Rob
Use the Visual Cues option in the Chart.
Hi Manish, it is just one chart. Sum(Test) and Sum(Compare) are measures of the chart and Name is the dimension. It is a scatterplot. I want to change the color that when Sum(Test)>Sum(Compare), show me red, and otherwise green. There are null values in Test that is messing up the condition. Thanks.