Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i am having a pivot table with a 3 expressions sum(metric), avg(upper) and avg(lower), the last two being the benchmarks to be applied to the sum(metric) to apply a background color.
there are also filters Browser,OS and Trip. When any of these filters are applied i dont want the color to change. But on an overall level i want the colors to be like
if(sum(Metric)>= Avg(Uppper),Green(),
if(sum(Metric)<<Avg(Lower),Red())
)
)
this works.
But when i use
if(Browser = Null(),
if(OS=Null(),
if(Trip=Null(),
if(sum(Metric)>= Avg(Uppper),Green(),
if(sum(Metric)<<Avg(Lower),Red())
)
)
)
)
so that the color is applied only when there are no filters applied, it doesnt work. It doesnt show error but no bg color appears.
Please help me out. What is wrong and is there any alternate solution????
No selections means everything is selected. What your testing for is if a value in a field is a null value. What you probably want is something like:
if(getselectedcount(Browser) or getselectedcount(OS) or getselectedcount(Trip),
null(),
if(sum(Metric)>= Avg(Uppper),
Green(),
if(sum(Metric)<Avg(Lower),
Red()
)
)
)
Try replacing "Browser = Null()" with "getselectedcount(Browser)=0". Also, you can combine those 3 if statements into 1 using AND. so
if(getselectedcount(Browser)=0 AND getselectedcount(OS)=0 AND etc...
No selections means everything is selected. What your testing for is if a value in a field is a null value. What you probably want is something like:
if(getselectedcount(Browser) or getselectedcount(OS) or getselectedcount(Trip),
null(),
if(sum(Metric)>= Avg(Uppper),
Green(),
if(sum(Metric)<Avg(Lower),
Red()
)
)
)