Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I am using a cyclic grouped dimension( group of Region and Country dims) for a bar chart.I have mapped each region and country to a color code file. So each region and country will have a unique color code. Now when I am creating the chart with this dimension and an expression, how can zi use both region and country color codes. If I use Region_color_code in the background expression then I get correct colors on the bars if user has selected Region dimension but it won't work obviously when he/she switches to Country.
So, please let me know if there's a way I can use both region color code and country color code simultaneously in the chart.
Any help will be appreciated.
Thanks!
There's a GetCurrentField() function which allows you to distinguish which field of a group is currently viewed. You can set a condition based on that:
If(GetCurrentField(GroupName)='Region', Region_color_code, Country_color_code)
Thanks Juraj. It worked nicely.