Jump to content

Stacked bar charts by values in each category


May Tam

Recommended Posts

You can use a workaround to achieve this requirement:

Suppose A,B,C are [Regions], next level in hierarchy is [state] and color by has [Category], then you can insert a rank expression between REGION NEST STATE

where

Count() OVER (Intersect([state],All([Category]),[Region])) - This will get you total values for each bar. As we are using Over function in X-Axis expression, do not forget to select "Current Filtering only" in X-axis > Settings, to have ranking update based on change in filters

 

DenseRank(..,"desc",[Region]) - This will rank total values of each bar in descending order for each Region

https://docs.tibco.com/pub/spotfire_server/10.0.0/doc/html/en-US/TIB_sfire_bauthor-consumer_usersguide/GUID-3E9F7F06-620A-40F5-9837-CB8997C511B8.html

Repeat( " ",..) - This will repeat blanks as per rank provided. As you know, by default barsare always in alphabetical order so rank 1 will have one blank, rank2 will have two blanks etc. and it will automatically be in order as seen in below screenshot

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...