How to display data from another tab based on heading? - google-sheets

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)
-

Related

Google Sheets: How to make a stacked/aggregate chart

I have made a bar chart which aggregates my data, but is there any way I can split each bar based on the data it is aggregating - similar to how a stacked bar chart would look?
Here is a bad artists impression (thick blue lines mine). The idea is that it's important to know from looking at the graph if I sold 5 at £1, or 1 at £5.
Ideally this would work even if the price for each item is variable, but that is not essential (eg: if there is a 'hack' with hardcoding Apple = 3, I can live with that.)
I'm also fine inputting helper columns etc, within reason, but I would want to be able to easily continue to add things to the list on the left without having to add new helper columns each time (calculated ones are fine, of course.)
Thanks in advance.
UPDATE: With thanks to Kin Siang below, I ended up implementing a slightly modified version of their solution, which I am posting here for completeness.
I added a very large (but finite) number of helper columns to the right, with a formula in each cell which would look for the nth occurrence of the item in the main list (wrapped in an iferror to make the unused cells blank).
=iferror(index(FILTER($A:$B,$A:$A=$D2),E$1,2))
Theoretically it could run out of space one day, but I have made it suitably large that this should not be an issue. It has the advantage over the other solution that I do not need to sort or otherwise manipulate the input range and can continue trickling in data to the main list and have the chart automatically update.
Yes, it is possible to display the chart in your case, however need some data transpose in order to do so, let me show you the example with dataset
Assuming this is your original data:
First sort the data by alphabet, and enter this formula in new column
=if(G39="",1,if(G40=G39,I39+1,if(G40<>G39,1)))
Next add new column for categorical purpose, by using concatenate function
="Price"&I40
In the transform data for chart purpose, enter this formula to split all price into different row, different column for different product
=sumifs($H$40:$H$47,$G$40:$G$47,$A41,$J$40:$J$47,B$40)
After that i select stack bar chart and ensure the price in under series, in case in 23 will have some problem to set price at series correctly, you can use 33 data create stack bar chart and update the data range again, it will work also
Here is the cute chart you expected, accept if help :)
*When certain fruit has less price record, it is advised to fill in 0, as the data table need in same column (see the orange price 3), although I didnot test if blank

Adjusting Pivot Chart on Google Spreadsheet

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.

Google sheets filter custom formula is moved by one row

I created a column of total profit in google sheets and my goal is to filter values which are less then 70% of previous profit value (screenshot so you can understand).
But when I apply this condition to the filter custom formula (here) is not filtering the values which are less then 70% but the values before them, instead it is moved by one row (hopefully you will understand).
It may be it is something easy to fix but i really couldn't find out. Thanks for your future advice and time!
*EDIT: https://docs.google.com/spreadsheets/d/1JcHVrpOCLEdMiTF3YD0qvJiHPsi6J2QwFPN-XOfAipY/edit?usp=sharing sheet in view mode
try to shift it:
=$B2/$B1>0.7

Change color of cell if sum of row drops below 2

I'm working on a sheet to help me keep track of inventory at a bookstore. Here is a watered down version. There are 19 titles in total, kept at three different warehouses. I'm working on a notification system where the top box will turn red if the sum of books in any single title drop to 3, so I know it time to restock.
How can I do that?
NOTE: I can't add another column to get the sum value. The original spreadsheet is pretty crowded as it is.
The full sheet is in the copy of Inventories.
A custom formula in conditional formatting to achieve this:
=ARRAYFORMULA(MIN(SUMIF(IF(COLUMN(C3:E3),ROW(C3:C21)),ROW(C3:C21),C3:E21))<3)

DB grid - can I display titles in the first row, not the first column?

I want to show MIN(), AVG(), MAX() for 5 measurements.
Given my screen real-estate, it woudl be much better to display my DG grid vertically than horizntally.
I would like to have a DB grid with 2 columns and 15 rows, rather than vice-versa.
But how would I get the text into the first coumn (e.g "Measurement 1 MIN()")? I would much prefer to use a DB grid, rather than a table of 1 x 15 with 15 TLabels to the left of it, but I don't want to store the "column (actually row) titles" in my database.
I hope that I described this clearly - please ask for clarification if not - and that someone can help.
A DBGrid displays the data from a data source. If you want the output to change, change the data - this means you have to do the pivot in your query instead. (I gave you a search term with the bold text, BTW; you want to pivot the data. I can't provide any more info, because a) you didn't say what database you're using, and b) that would be a separate question not related to Delphi.)

Resources