cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional bar chart in WebI

vishal_p3
Participant
0 Kudos

Hello,

We have a table with the below details

S/N     Company     Category       Profits

1                G             Small             60

2                H             Large             35

3                 I              Large             70

4                J              Medium          80

5                K              Small             40

6                L              Medium          75

I need a column chart in Web-I4.1 which should show

X-axis : Category

3 bars for each of "Small, Medium & Large" count(here count value is 2 for each) and with a condition "differentiate the color of the partial bar if Profits less than 50 and the other partial greater than 50"

Y-axis : Total number of companies(here 6).

Considering the above table, the category "Large" has 2 as count and should show the partial bar with one color and the other partial with other color.

Thanks,

Vishal.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI, can you share a mockup of what you're expecting?

regards,

ROgerio

mhmohammed
Active Contributor
0 Kudos

Hi Rogerio,

I'm pretty sure that the mockup Vishal provides (if he does) will look something like below, except that the columns height would differ according to the Profit value, the Small/Medium/Large values inverted which is understood, legends added and some other formatting changes.

Do you agree Vishal?


Thanks,

Mahboob Mohammed

vishal_p3
Participant
0 Kudos

Hi Mahboob,

Thank you for your investigation.

It was almost the same except the count of each category. It should be similar like below if I consider the tables data.

Also could you please let me know how & by which formula you formatted the graphs? and what are the axes you considered?

Thanks again,

Vishal

mhmohammed
Active Contributor
0 Kudos

Hi Vishal,

As I said in my response with the work around, those are NOT Charts, they are Tree Maps. I created 3 Tree Maps, one for each Category (Small/Medium/Large). And again, there's really not axis as its not a Chart.

Steps to create a sample with the way I did:

  • Insert a blank Tree Map from Report Elements -> Others -> More -> All Charts -> click anywhere in the blank area in the report and it will insert a blank chart and open Insert a report element window like below. Go to Map -> click on Tree Map and make selections on the right as shown.

  • Right Click the chart -> Filter -> and add filter on Category and select Small. And you'll see something like what I created.

I don't know how you can turn it anti clockwise 90' to look like what you want.

Thanks,

Mahboob Mohammed

Former Member
0 Kudos

Hi Vishal,

I believe this could be of some use


Regards,

Rogerio

mhmohammed
Active Contributor
0 Kudos

Also, to get the Category names as I have in the chart, rightclick on the Chart/map -> Format Chart -> Title -> Design -> Title, check the box for Visible and in Title Label, write the formula as =[Category].

FYI: I'm using the sample data from your first post, so you'll have to replace Profit with Project (Number of projects) as in your mockup.


Thanks,

Mahboob Mohammed

vishal_p3
Participant
0 Kudos

Hi Mohammed,

I tried using the Tree map but the requirement is of a column chart all together.

Hence, I would be pleased if someone could help me in this regard.

Thanks,

Vishal

Former Member
0 Kudos

Hi,

Did you tried out My solution?

Regards,

Rogerio

vishal_p3
Participant
0 Kudos

Hi Plank,

I tried creating two measure variables(Red & Green) as suggested

Red: =If([Profits]<50;[Profits]) & Green =If([Profits]>=50;[Profits])

and created a staked chart with

     Category axis as: Category

     Value Axis 1: Red & Green.

But end up with the below chart (colors not included).

As the category values are summed up and shown(referring the above table values).

But my requirement is something where I should get the count of each category with color differentiation against the condition.

Thanks,

Vishal.

Former Member
0 Kudos

Hi,

try using :

[red] = Count([Company] Where ([Profits]<50)) and

[green]  =Count([Company] Where ([Profits]>=50)) instead

Regards,

Rogerio

vishal_p3
Participant
0 Kudos

Hi Plank,

Either this has not giving us the expected result.

I strongly feel that, with the above data set we can not get the expected graph and since the data source is from BEx query, could it be possible to change the existing query or include a new query in such a manner that we could achieve this?

Some thing where at least we could see the below data set in Webi to suffice?

Category    >50ProfitsCount     <50ProfitsCount

Small                  1                               1

Medium              0                               2

Large                  1                               1

 

or any suggestions on the data set which would suffice my requirement?

Thanks,

Vishal.

Former Member
0 Kudos

Hi,

isn´t this you´re looking for ?

Regards,

Rogerio

vishal_p3
Participant
0 Kudos

Hi Rogerio,

Yes, exactly the same graph... I would be pleased to know the solution.

Thanks,

Vishal.

Former Member
0 Kudos

Hi Vishal,

attached are two files :

The first one is the wid file renamed to .txt so I could upload it and the second is the data provided by you.

This was done in BO 4.1 SP5.

Regards,

Rogerio

vishal_p3
Participant
0 Kudos

Hi Rogerio,

It is working as exactly expected. Thank you so much for your time on this.

I observe that the "Globally Stacked chart" stacking property done the trick.

Once again thank you!

Regards,

Vishal.

Former Member
0 Kudos

Hi Vishal,

glad it works !!!!

Regards,

Rogerio

Answers (2)

Answers (2)

mhmohammed
Active Contributor
0 Kudos

Hi Vishal,

On a second thought, I was able to get it like this. Do you this works for you? Can you persuade the users to live with this?

  • In the Bar for Small (category), we're seeing Percent (i.e., Profit / Total Profit for that category).
  • In the Bar for Medium (category), we're seeing the actual Profit value.
  • In the Bar for Large (category), we're seeing just the Company.
  • Obviously, I included the sample data that I'm using, its exactly what you have.

Hint: Those are 3 Tree Maps (1 for each category)

Let me know what your users thinks and if you want to proceed this way.

Thanks,

Mahboob Mohammed

mhmohammed
Active Contributor
0 Kudos

Hi Vishal,

This is a tough one, please sign up on BI Ideas, check out these ideas and Vote up on them, so that, SAP implements Alerters in Charts as a feature.

Conditional Formating (fromer Alerter) on graphs : View Idea

Change color of single bar in a bar chart : View Idea

Thanks,

Mahboob Mohammed