Excel - Charts with varying number of rows - excel

I have an existing spreadsheet and macro process I'm trying to improve, and I have multiple tables which refresh for each client, and can have between 3 and 6 rows of data (depending on whether someone has enough history to fill all 6 rows). There is a chart attached to the table which works fine when all 6 are there, but when there are fewer rows, the chart leaves a blank space on the X-axis to account for that table row.
Example of the table when full
Quarter Value
2021Q1 10
2021Q2 7
2021Q3 4
2021Q4 2
2022Q1 1
2022Q2 0
Example of the table when less than full
Quarter Value
2021Q3 4
2021Q4 2
2022Q1 1
2022Q2 0
On the second table, there will be places on the X-axis for values, rather than knowing there's no data and only showing 4 places
Is it possible for excel charts to refresh dynamically depending on what is in the source? I have found plenty of guides for what to do with the chart lines when there is no value, but not to ignore a whole row from the report.

Related

Pivot Table Showing Inaccurate Data in 1 Row

I've been struggling to find the root cause of this problem. I have a raw data table in RAW DATA worksheet (created a relationship with table in vlookup data (Image 2) to use power pivot), and I have a pivot table OVERALL worksheet that I need to show the payload cycle for March 2021. All but 1 row showed correct data. Payload range 54.6~59.2 (image 3) should have 11 cycles (image 1). But instead, the cycles showed in the (blank) category of the pivot table. However, when I change the rated payload value from 91 to other values from far 91, like 100 and above (MAIN worksheet), the pivot table becomes accurate. I dont know why this happens.
Excel macro file link
Image 1
Image 2
Image 3
Your relationship for raw_data[UPPER LIMIT] and index_data[UPPER LIMIT] for 59.150 is failing. I tried to pull in the RELATED() PAYLOAD, and got blanks for that limit.
In your V-look up data sheet I changed the UPPER LIMIT from "above" to 999. That allowed both columns in your data model to be formatted as Decimal Number and fixed the missing cycles.

Filtering top 10 elements in pivot table does not show expected rows

I am using the excel's pivot table to sort and filter data from Super Store Dataset from tableau . Here is a screen shot of my output.
The steps that I followed are:
a. Put Order Date in the Rows.
b. Put Sub-Category in the Columns.
c. Put the Profit in the Sum of Values.
After that I took these steps:
d. Sort the Grand Total of the Sub Category from largest to smallest.
e. Sort the Grand Total of Order Date from largest to smallest.
f. Filter Top 3 from the Sub-Category.
g. Filter Top 10 from the Order Date.
And the above image of an excel sheet shows my output.
Now the problem is , even though the excel sheet was supposed to show me the top 10 orders , it only manages to show 7 to 8 orders. The rest 2 to 3 of them are either blank or should not even belong to the top 10 category.
Does anybody knows why is this happening. And how can this be prevented.
Thanks.
Edit: This is how the top 15 looks like :
I believe top 10 is based on the vertical Grand Total and it should also be a subset of the top 15.
And this is the top 20 :
It looks like this is caused by opening the .xls workbook in Compatibility Mode. This means that Version 10 pivot tables are created, which have different filtering functionality to the later, Version 12 Pivot Tables.
Change the workbook to an upgraded file format (.xlsx), and refresh your pivot tables - you'll get an interesting message informing you of the changes made to Top 10 filtering, and then the multiple Top N filters will apply correctly:
Here's some more information about Pivot Table versions / compatibility, from Microsoft

Dynamically filter Series in Excel

I have an excel sheet in which the chart is dynamically generated each time it runs based on a data table within the sheet. However, due the Excel Series 255 limitation, the chart stopped generating.
Is there a way I can define a subset of Series so the chart can dynamically pull its related data from the table?
For example if I have:
Product Q1 Q2 Q3 Q4
Apples 1 2 3 4
Bananas 3 4 5 6
Oranges 4 5 6 7
Strawberries 1 2 3 5
Within excel, how can I define only Apples, Oranges and Strawberries for the line chart so it will display its related Q-values?
TIA
If I understand you correctly, you can use a simple filter. For example, here is your data plotted originally.
And here is the data after having
applied a filter (Data Ribbon / Sort & Filter Tab / Filter)
Select the table area
execute GoTo Special / Visible Cells Only
Insert a new graph
If this is something that needs to be done frequently, you could write a VBA macro to better automate the process.
If you change a value in a visible series, the chart will change. But if you change the filter, you will need to go through the process again.

How to change columns in a plot with shortcuts

I am working on Microsoft Excel 2013 scatter plots and I'd like to know if there is a more productive way to do this:
Let's say I have a big database with several columns and rows, i.e:
A B C D
1 Length Width Volume Area
2 2 1 8 4
3 3 2 7 1
4 1 5 3 5
5 7 3 12 6
I create a scatter plot for Volume vs Length. After, I want to create another scatter plot for Area vs Width. As I have a lot of rows and columns, I copy the first plot and then, in select data, I change the range of data (A to B and C to D). Is there an efficient way to do this? (shortcuts with arrows keys, maybe? I didn't find them) or Do I have to change the letters manually?
Thank you.
J.
If this is a repetitive task in the sense that every say Friday you create the same 4 graphs based on new information in the same columns then you could record a macro of what you are doing and associate it with keyboard short cuts.
You can do the same thing with updating the graph information but it starts getting a little more complex when you start changing which column number you want as the series. But its definitely possible. I would recommend recording a macro of you editing the 2-3 graphs so we can sheet patterns and we can probably help you edit the macro.
Now something simpler that may, and I stress may, suit your needs. Select A1 to D5, then insert you XY scatter plot. You X axis which should be common to all needs to be in the left most column. When you go to edit your source data you should see each series listed. You can simply check and uncheck which series you would like to have active. the ones with a check mark will display. If you needed three graphs at the same time, you could then copy and paste the graphs twice and set up each one to your desire without having to reselect the data range, you would just check/uncheck which series to display

Control which rows a data table will calculate

I have a 2-way data table in Excel (as in the option under "What-If Analysis"). There are 50 rows when analysing a 50 year deal, but only 4 rows when analysing a 4 year deal.
I only want to use one data table (of 50 rows) but I don't want it to calculate all of the values if it doesn't have to. e.g. if I have a five year deal I want the values in the first 5 rows to be calculated, but for the rest I would like it to display 0 or a blank.
Is there a way to do this without VBA?
(I was thinking with VBA I could create a whole new data table every time I run it, but would prefer not to as I am still developing structures.)
I'm guessing that either your row labels will step consistently. Just blank out the years that are not required, when not required (rows 6 and upwards in your example for 5 years), and repopulate with series fill to suit.

Resources