Adjusting Pivot Chart on Google Spreadsheet - google-sheets

I´ve been trying to
a.) see the value in the legend (e.g. Blue = Name A)
b.) remove the numbers (ids) at the x-axis
Can anyone guide me in the right direction / help me with this?
Thank you!
EDIT:
The initial data looks like this:
I created a pivot table that is then using SET as columns. Therefore I am not able to the option "Use first row as header".
I found the reason why the x-axis has the values on it:
EDIT 2:
Thanks for the answer!
Problem is that I can´t choose "row 2 as an option"!
(FYI: Set = Name)

Solution:
Given the table that was sent, you can generate a pivot table with this setup to prepare for graph generation:
Then generated a graph with these settings. Note that Use Row 2 as Headers and Use Column A as Labels are both checked:
The X-axis scale are automatic though, they will be adjusted based on the number of entries (and the value) in the defined X-axis.

Related

Using filter with offset

I have a google sheet with a number of columns and tick boxes. I want the Table header to be displayed and joined together when the boxes are ticked in each row. For example looking at the screenshot below:-
In the result for John in row 2, I would want to have a Red and Green joined in Cell M2.
Currently have got this formula to pull filter the boxes that are TRUE
=IFERROR(JOIN(" ",FILTER(B2:L2,B2:L2=TRUE)),"") but cant seem to work out the rest. I'm fairly sure the offset function is probably needed or a query may be easier?
formula:
=BYROW(B2:L,LAMBDA(bx,INDEX(TEXTJOIN(", ",1,IF(bx=TRUE,B$1:L$1,)))))

How to display data from another tab based on heading?

I'm in a problem as per the question, i want to display the data on the basis of heading. Heading's position may subject to change from column A to C per week, so =InputA1 formula is not what i need.It have to match both tab headings and display under output tab ( under the matching heading ).
One more thing i need is input may contain huge data where i want to
avoid the row if stock less than 10
avoid the row if code is empty
avoid the row if UNC is 0 or blank
A sample sheet is dropped below where there is estimated output also. Please help me.
https://docs.google.com/spreadsheets/d/14W6mLw4Z-1DN4TwHxbwx8KRcNfRg9u_B6m1dA0JjtSQ/edit#gid=692673040
Thanks
Please checkout the solution added to your output tab.
=QUERY(BYCOL(A1:F1,LAMBDA(afx,FILTER(input!A:F,COLUMN(input!A1:F1)=XMATCH(afx,input!A1:1)))),"Select * Where "&"Col"&XMATCH("STOCK",A1:F1)&">=10 AND "&"Col"&XMATCH("CODE",A1:F1)&"!='' AND "&"Col"&XMATCH("UNC",A1:F1)&"!=0 AND "&"Col"&XMATCH("UNC",A1:F1)&" IS NOT NULL",0)
-

Google Sheets Chart / Multiline labels in Column Charts

I need your help on this one. I'm looking to create a chart (without code) to display data by month in column charts, either like this:
Or like this:
In the figure 1, I read that the volume of 10 is driven by A, B & C.
In the figure 2, I read that the volume of 10 is driven by 4xA, 2xB & 4xC.
I tried to create my chart but the labels are awful on a single line, and I did not find any way to add a newline characters (\n, ...) in my labels serie.
Any idea to do one or the other one without going though apps script?
Thanks for your help!
You can do this by adding a label column to your data. See this example,
https://docs.google.com/spreadsheets/d/1H5frKDH612ciLKnB0HY7FiB2FNQBobbhFGcvYqxC7f8/edit?usp=sharing
Add one label column for each data column
Create chart
Use stacked non 100%
Set range to include all labels
Set labels
In customize series check labels is on
In the downdown for label pick custom rather than value.
ScreenShots -
1. Add Label Columns 2. Set Labels on Series 3. Turn Labels On

Google Sheets - Waterfall Chart Subtotal Labels

Here's a data sample
and screenshots too.
I'm trying to make a waterfall chart with Start/End year performance and contributions. I was trying to make the chart more descriptive by including a customized label, with percentage variations.
No matter how I select the labels column, the ending Subtotal bar is independent from the others. I'm trying to customize both bottom and top labels, but I'm more concerned on the top one (the growth/loss percentage or the absolute value at the end of the year.
Thanks again to #kirkg13 for guiding me through the solution. It was not quite difficult in the end, but I think the option should be made clearer/simpler in some future updates.
You can check my solution on the Chart 4 from the sample file as long as It'll be online. Steps are as follows:
1: Lay the data in three columns: Column names, values (start value, absolute deltas and end values) and custom labels (whatever you like, in my case % variations for all columns except start/end). Include the subtotal column
2: On the chart editor make sure all the data is selected, including the sub-total (from Start Year to End Year in my example). Check that x-axis and series are correctly assigned (column 1 and 2); from the series click and add a label, selecting the third column.
3: This is the part I had difficulties finding: on customize>series>data labels, you need to:
Uncheck the "Add subtotal..." box (optionally check the "Use first value as subtotal" one, for better color clarity
Below, click "Add new subtotal".
The new Subtotal must be of "type" "Replacing" and "column index" as the last column you have
The end result is as below: all columns have a customizable name and label, with coherent colors.

Add a vertical line to Google Sheet Line Chart

I have a sheet with a line chart, now I'm trying to do something maybe very simple: I would like to add to this chart a vertical line using a value in a cell.
So I have this line chart
And a cell with the date 2016/01/01, I would like to have a vertical line through all the chart on the cell date
I can't figure out how to do it...
This is a copy of that sheet: https://docs.google.com/spreadsheets/d/1oeiwmeDT8pUVqBQvoE_cqk7mZxxvD5moZr41Vp4IN2I/edit?usp=sharing
I would like to show a vertical line using the "Purchase date"
I had the same problem and created a solution to overcome limitations of Google Sheets charts.
The main idea is to create an additional line in the chart, with only two points, both with the desired date. The value of the first point is 0 and the last has the maximum value of the Y axis. This way, the line always covers the entire height of the chart.
Screenshot of the Chart
Note that it is necessary to add two new values in the X axis (highlighted in blue on the sheet). Don't worry with the fact they are repeated. Google Sheets handles it correctly.
These values can be placed at the beginning of the lists. This way, it is possible to add new values at the end of them.
This solution can be viewed in: "[GoogleSheets] Dinamic Vertical Line in a Chart"
To change position of red line, just select a different value in "Purchase date" (yellow cell).
I made a merge of my first solution with the one suggested by dimo414 and created a new solution with two variations.
In the previous version of the spreadsheet, there were only two points to draw the vertical line.
In the new version, a third point were inserted to show intersection between the line and the real curve. A new column was also created, containing only a label for the new point.
The result is:
Theses changes can be seen in green background in sheets 'Dashboard_v2' and 'Dashboard_v3' of the SpreadSheet.
To determine coordinates of the new point, two approaches were used:
Search Purchase Date directly in the dataset (see sheet 'Dashboard_v2')
If the goal is to highlight only points of intersection that belong to the original dataset, it is just necessary to VLOOKUP() the date in the dataset.
Interpolate the two points immediately smaller and larger than the purchase date (see sheet 'Dashboard_v3')
Given the points [x1,y1], [x2,y2] and a value of x (where x1 <= x <= x2), its possible to find an interpolation point [x,y] with the following formula:
y=(y2-y1)*(x-x1)/(x2-x1)+y1
Although this formula is easy to implement, find the correct points to interpolate is more challenging and requires a bit of creativity.
At first, I thought of using a JS script to make things easier, but decided to use only builtin functions.
By the way, different approaches to find [x1,y1] and [x2,y2] are welcome.
To make things easier to understand, each point coordinate is determined in a different cell (see L2:M5) and the point of intersection is in L6:M7.
Of course, its possible to join all of them in just one cell, but I thought it would be harder to understand.
To close, one more detail: According to above definition, interpolation formula is valid only if (x1 <= x <= x2). Thus, both cells C2 and M6 have protections to limit the value of 'x'.
One way is to add a label to your x-axis.
For example, this is a chart that plots weight against date, with a label "Cheat Day" on 2021-07-21
For the data:
Date
Label
Weight (kg)
Weight Goal (kg)
2021-07-19
83.85
75
2021-07-20
84.55
75
2021-07-21
Cheat Day
83.8
75
2021-07-22
84.95
75
2021-07-23
83.75
75
Go to Edit the chart > Setup > Under X-axis > Click on ••• next to your "Date" column > Add labels > Select the column "Label" as your label.
Your Chart Editor > Setup should look like this:
you can have it like this, unfortunately not programmatically. the only way is to insert a line via Drawing and position it manually where needed.
spreadsheet demo
As best I can tell there isn't a way to add a vertical marker line to a chart in Google Sheets. One option that may be "good enough" in many cases is to "Add notes to a data point" and then use "Format data point" to make the point more visible. Here's an example, from your spreadsheet:
Unfortunately one limitation with this approach is you can only label a data point in the data set the chart is displaying. In your case the date you wanted to mark with a line isn't in the data set, so this won't work directly. You might be able to introduce a separate data series consisting of just that date and then add a note to that data point, but I haven't fiddled with it enough to make it work.

Resources