BarChart X Axis:Custom Expression-Case statement and NEST columns failing

Hello Everybody!

I'm trying to set X axis conditionally based on a property control (drop down) selection. My code in X axis custom expression goes this way :

case when "${varLocation}"="Cities" then [Region] NEST [City]
    when "${varLocation}"="States" then [Region] NEST [States]
    when "${varLocation}"="Region" then [Region]
end as [Location]

 

but this code does not accept NESTing & throws an error saying "The expression is not valid after NEST on line 1..."

I tried using If() also but no luck. Though, I can achieve this using python script, I want to minimize the script usage & limit to only those situations when there is no other option.

Has anybody came across such issue? Any help would be much appreciated!

Thanks,
KD

(4) Answers

Login