StateName - chart function

StateName() returns the name of the alternate state of the visualization in which it is used. StateName can be used, for example, to create visualizations with dynamic text and colors to reflect when the state of a visualization is changed. This function can be used in chart expressions, but cannot be used to determine the state that the expression refers to.


StateName ()

Example 1:  

Dynamic Text

='Region - ' & if(StateName() = '$', 'Default', StateName())

Example 2:  

Dynamic Colors

if(StateName() = 'Group 1', rgb(152, 171, 206),

if(StateName() = 'Group 2', rgb(187, 200, 179),

rgb(210, 210, 210)



Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?