Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to set an expression for one (or maybe eventually several) of the dimensions that make up my drill down group, such that if I make multiple charts the colouring remains consistent. In this case I want to make my different grants within "Grant report. Grant Name" have a specific set of colours.
However I keep getting.... error in expression ')' expected.
My expression is below. I actually copied this from another example where someone was discussing how they had set their colouring and theirs seemed to be working.
=if (Grant report.Grant Name="xxx",RGB (234,147,90))
Just to add I don't have any coding experience and the colour coding is arbitrary at the moment. Although is there also another way to set this more easily?
Hi,
change
Grant report.Grant Name="xxx" into Grant report.Grant Name='xxx' (single quotes)
Regards
Try this may be
=If([Grant report.Grant Name] = 'xxx', RGB(234,147,90))
Added square brackets around Grant report.Grant Name field. And changed the double quotes to single quotes around xxx
Thanks that seems to work. I actually did have the single quotation marks before and it still hadn't worked but the square brackets seem to do the job 🙂
So if I now want to do this for all the grants, what else do I need to consider?
=If([Grant report.Grant Name] = 'aaa', RGB(000,000,153))
=If([Grant report.Grant Name] = 'bbb', RGB(000,000,153))
=If([Grant report.Grant Name] = 'ccc', RGB(000,204,102))
=If([Grant report.Grant Name] = 'ddd', RGB(000,153,076))
=If([Grant report.Grant Name] = 'eee', RGB(255,153,153))
=If([Grant report.Grant Name] = 'fff', RGB(255,102,102))
=If([Grant report.Grant Name] = 'ggg', RGB(255,051,051))
If this is a single expression... then try this
=If([Grant report.Grant Name] = 'aaa', RGB(000,000,153),
If([Grant report.Grant Name] = 'bbb', RGB(000,000,153),
If([Grant report.Grant Name] = 'ccc', RGB(000,204,102),
If([Grant report.Grant Name] = 'ddd', RGB(000,153,076),
If([Grant report.Grant Name] = 'eee', RGB(255,153,153),
If([Grant report.Grant Name] = 'fff', RGB(255,102,102),
If([Grant report.Grant Name] = 'ggg', RGB(255,051,051))))))))
or you can do this
=Pick(Match([Grant report.Grant Name], 'aaa', 'bbb', 'ccc', 'ddd', 'eee', 'fff', 'ggg'),
RGB(000,000,153),
RGB(000,000,153),
RGB(000,204,102),
RGB(000,153,076),
RGB(255,153,153),
RGB(255,102,102),
RGB(255,051,051))
Thats really helpful, thanks.