Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi community! 🙂
Please help me with expression for pie chart color. I have questionare with few questions and one pie chart to show them one by one using this expression to choose dimension (question):
=$(=subfield(GetFieldSelections([Question_number]),',',))
Each question has different number and type of possible answers, but all has one common - 'Others'.
For example I'm using this for pie popout: =$(=subfield(GetFieldSelections([Question_number]),',',))='Others'
And now I want to use something similar for set color of that 'Others', but not of the rest.
Somthing like this? if($(=subfield(GetFieldSelections([Question_number]),',',))='Others', RGB(255,0,0),Rand)
Great, it is simple and works absolutely how I want to. THANKS 😉
OK, one more thing. In some cases there is same color for these answers in else part of
if($(=subfield(GetFieldSelections([Question_number]),',',))='Others',RGB(255,0,), Color(100*Rand()))
Is it possible to use random, but unique value?
Try multiplying Rand() by 10 instead of 100.
=Color(10*Rand()))
That doesn't help. I've also tried this:
if($(=subfield(GetFieldSelections([Question_number]),',',))='Others',RGB(255,0,99), RGB((700*Rand()),(999*Rand()),(500*Rand())))
but again, in some cases there are some colors duplicated.
My temporary solution is sort values(answers) by:
if($(=subfield(GetFieldSelections([Question_number]),',',))='Others',1)
so 'Others' is always first and I can set color in color tab...