Skip to Content
Author's profile photo Sanjo Eapen T

Grouping data in charts in WebI

Hi All,

Recently I came across a requirement wherein we had to show 2 different colors on the same chart (blue and yellow) for one dimension which has 7 different values.

Ex: Mon, Tues, Wed, Thurs, Fri, Sat, Sun are the dimension values. The customer wanted the value on the chart for Monday coming in Yellow whereas for others in blue.

This is only possible in SAP BO 4.0 + as there is an option on the chart to put formulas in charts. This is the way I achieved it. Below is the sample table I created from efashion to demonstrate the way I did it.


Then I changed the above table to column chart.

Direct Conversion of Table.PNG

Notice I have set the graph to change colors based on the state. Hence for each state I will get a different color. After this I used a simple formula for grouping

Formula for Graph.PNG

In the State Dimension, i placed a formula like if([State]=”California” then “California” else “Other States”. This formula will group California and remaining states as 2 different sub-sets of data on the graph as seen below.

Formula Conversion of Table.PNG

In a similar way I achieved the desired reults for me showing yellow color bar for Monday in each week and blue for other days in the week so that the customer can easily understand the beginning of the week when they look at the chart directly.

Hope this helps you in some way.



Assigned tags

      1 Comment
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Sanjo,

      I have noticed that when I try to change the color on the Webi bars based on a dimension, the width of the individual column shrinks and it is not very visually representative of the information. Is there a way I could increase the width of the column.