Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi is there a way I can write an expression using a dimension iam not showing in the chart?
For Example :
col1(dimension1) | col2(dimension2) | measure |
njk | abc | 2.3 |
njk | uio | 5.6 |
rbj | oip | 7.8 |
xyz | nji | 9 |
xyz | kji | 8.9 |
xyz | lpo | 7.6 |
col1 and col 2 are related data but iam only using col2(dimension1)) in my bar chart. Iam sorting descending on measure
But I want to color the exprssion by col1(dimension1)
expression:
if(dimension1='xyz' then green, ...n so on....)
thanks
Prana
Yes, you can reference fields not in the chart in your backgrouund color expression.
-Rob
Hey Rob thanks for your reply, sorry I didn't understand clearly. you are saying its possible and I should be writing a code on the not in color/legend area?
do you mind giving me an example file on where to write the code? and how.
Hi,
Your background color expression would be like:
if(dimension1='xyz', green(),
if(dimension1='njk, red(),
blue()
))
-Rob
Thankyou Rob , it works.
oh yes,it works, thank you. !
Just one more qn , It works fine when I use data items with no spaces (POC,Area).If I use the fields which have spaces it is not working. (Field History). my varaible defination is ,
result:
apologies - I just realized I posted this on the wrong window