Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dynamic Bar chart in Excel

Posted on 2016-10-21
5
Medium Priority
?
79 Views
Last Modified: 2016-10-21
Can someone please show me how to create dynamic  chart for the data attached here?  In the attached example, mint does not have any sales.  How can i build a dynamic chart that hides mint from the chart and only show mint sales on the chart when mint is not blank.
Book12.xlsx
0
Comment
Question by:fb1990
  • 2
  • 2
5 Comments
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 41854094
Recast your source data to look like this:

Category      Product      Result
Percent Sales      cookie      42.64%
Percent Sales      sweets      84.75%
Percent Sales      dough      22.64%
Percent Sales      oil      20.00%
Percent Sales      biscuit      52.16%
Percent Rewards      cookie      48.10%
Percent Rewards      sweets      70.29%
Percent Rewards      dough      38.10%
Percent Rewards      biscuit      92.78%

Then create a PivotChart on that data, with Product as the Axis field, Category as the Legend field, and Sum of Result as the Value field
0
 
LVL 33

Accepted Solution

by:
Subodh Tiwari (Neeraj) earned 2000 total points
ID: 41854117
Refer to the attached and see if this is what you were trying to achieve.
Book12.xlsx
0
 
LVL 1

Author Closing Comment

by:fb1990
ID: 41854334
Thanks Patrick and Neeraj.  Neeraj solution worked for me.  Is there a way to hide #N/A?  I want add data label and don't want that to show
0
 
LVL 33

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41854345
You're welcome.
#N/A is necessary to hide the series with no data in this case Mint sales.
0
 
LVL 1

Author Comment

by:fb1990
ID: 41854569
Thank you.  I added iferror to mask it and it changed the #N/A to 0%.  I want it to go away but i can live with it.  Thanks a a bunch as usual
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question