Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All.
I have an application in which I what to change the background colour for all dimensions based on the value of an expression.
The background colour is being set correctly, however, the editor is flagging the expression name as a 'Bad field name' in the dimension's background setting.
Is this an issue with the editor?
I have attached an application demonstrating the issue. I am using QV11 SR2.
Thanks,
John.
If you've tested it on both the server and in desktop, and it seems to be working, I would go with it. There are other times where expressions show as invalid (such as when using -= in set analysis) when they are in fact perfectly correct.
It's because you're referencing the expression by name. If you change it to
=if(Sum(Sales) = 0,yellow(),white())
it won't show it as an error anymore.
or
=if(Column(1) = 0,yellow(),white())
Hi
Try Like this
dimensions--->Background colour
if(sum(Sales)<=0,Yellow(),White())
Thanks for the quick response Nicole, Massimo and Nirmal.
I do realize that I can enter the full expression or the column number. The expression is much more complicate than in the sample I attached.
My thinking is that if I can use the expression label, which seems to work, then no change will be required to the background colour setting if the expression changes or if another coloumn is added to the chart.
I would like confirmation that using the expression label is valid and the 'Bad field name' message is a bug with the editor.
Thanks,
John.
If you've tested it on both the server and in desktop, and it seems to be working, I would go with it. There are other times where expressions show as invalid (such as when using -= in set analysis) when they are in fact perfectly correct.
It works, on desktop and on server too (I tried Ajax)
I agree with you, John