Converting data into specific table - Google Sheet - problem - google-sheets

I am trying to create a specific table based on data downloaded from a certain tool.
The best way to describe my problem is to check the table with example data and result that I would like to get (link to the Gsheet and screenshot attached below).
Part of the data like "type of activity" sometimes can be done a few times, but in the "result" table they need to be summed up.
https://docs.google.com/spreadsheets/d/1u4dMoUWg6r3eUVZ9qEfkWiMS8iLgDr_TwnjS1GEXKTU/edit?usp=sharing
here is a screenshot
google sheet
and a link to It in case if it wont work https://pics.one.ly/wbuXpg40

Use QUERY() function with pivot clause. Try-
=QUERY(A11:D25,"select B, sum(D) group by B pivot C")

Make a pivot table
check data : you have typed clinet instead of client

Related

IMPORTRANGE in Google Sheets preserving the structure of the destination sheet

Suppose that we have the following Google Sheet (called File_1):
And we import all the columns (A to C) via IMPORTRANGE("https://docs.google.com/spreadsheets/...", "Sheet1!A:C") into another sheet (called File_2), which also contains an additional column New_col with some data in it:
Now, suppose that the source sheet changes like this, i.e., a new row is added in-between the existing rows:
The destination sheet will become like this, in essence keeping Column D in its previous state and 'breaking' the relation of the 'test' value in cell D2 with the A1-B1-C1 row.
What I would like to have instead is the following destination sheet:
Is there a way to do that from within Google Sheets?
You are describing how formula results get misaligned with manually entered data. There is no turn-key solution to work around the issue. Lance has given a thorough treatment of the row misalignment issue and how it can be dealt with in some cases.

Trying to index match data from a different workbook

My colleague collects data in Google Sheet A. I want to reference and index-match some of that into my sheet B where I track the progress of projects. I've tried two different ways of doing it, and neither of them work for me.
Here are the two ways I tried:
I created a new tab in sheet B. Then I used importrange to sync with the data from sheet A. Then I used index match to reference the data from the importrange in the same sheet. Indexmatch did not work with the importrange data. Only once I copied and pasted it as values, did the data come over, but that of course broke the live synced importrange.
I tried to do the indexmatch and importrange at the same time using this formula from this forum:
=INDEX(IMPORTRANGE("SheetA",Tab"!A4:H26"),MATCH($Cell,IMPORTRANGE("SheetA",Tab"!A4:A26"),0))
But that just gave me an error.
Any other ideas on how to approach this?
use vlookup:
=VLOOKUP(A1; 'Sheet A'!A:H; 2; 0)
Maybe because it's just schematic, but have you used the quotation marks this way? --> Tab"!A4:H26"
You should use them like this --> "Tab!A4:H26"
And when you write "SheetA" you're writing the Spreadsheet Id, right??
And you should add another comma before the last parenthesis and tell which column you want to grab the final data from (1 for Column A, 2 for column B, etc.)

Separate and stack values from comma separated list

I have a google sheet that is looking at another sheet in the same workbook with cell values that are a string list populated by a pandas dataframe generated from a REST API json response.
I need to visualize this data so I'm thinking need to parse the comma separated values from the list, then append/stack them on top of one another so that I can reference the column in a pie chart in Google Data Studio.
I parsed the values using the SPLIT function (column C) but now stuck on how to append them into one column stacked on top of each other.
There could also be a totally different approach here that I'm not thinking of. Any tips on how to build this out so it's in an array method (updates as the reference sheet is updated daily) that would be awesome - thanks all.
Alternatively if there's a way to create a field at the Google Data Studio report level that would work well too.
use:
=ARRAYFORMULA(QUERY(FLATTEN(IFERROR(SPLIT(REGEXREPLACE(Sheet2!A2:A,
"\[""|""\]|"",""|\['|'\]|','", "♦"), "♦"))),
"select Col1,count(Col1)
where Col1 is not null
group by Col1
label count(Col1)''"))

Google Sheets: Join two tables together

Link to sample sheet - https://docs.google.com/spreadsheets/d/1nKQXHwVO8KjsOy5qvjzh-s-YYRUYlAoH-3aXYbwcKsA/edit?usp=sharing
I have a report that's downloaded from the google ads console which looks like this:
I get a report from the client which attributes leads to google ads campaigns like this:
I want to combine both these tables together to make them look like this:
If you look at the data in the first to tables, you'll see that the report the client shares with me has leads attributed to 24th March. This date is not present in the report that I got out of the google ads console. Using a sumifs formula will not capture all the leads that I get from the client's report.
Essentially, to get the data from both tables in the output table, I need to do a full outer join.
I'm not sure how to do that in google sheets. Any help you can give me would be greatly appreciated!
I made a new tab in your sample called MK.Help.
I then put this formula in cell L3:
=ARRAYFORMULA(QUERY({A3:G;{H4:I,IFERROR(ROW(H4:H)/{0,0,0,0}),J4:J}},"select Col1,Col2,SUM(Col3),SUM(Col4),SUM(Col5),SUM(Col6),SUM(Col7) where Col1 is not null group by Col1,Col2 label SUM(Col3)'Impressions',SUM(Col4)'Clicks',SUM(Col5)'Cost',SUM(Col6)'Leads',SUM(Col7)'Offline Leads'"))
That do what you're hoping?

"Formula parse error" when querying different document

I am attempting to have a cell in Sheet B display data from a cell in External / Remote Sheet A, but it results in "Formula parse error." (ETA detail to aid searches: displaying data in one Google Spreadsheet from a different Google Sheet.)
My query:
=Query(SheetA,sheet1!A:I,"select I WHERE A=3")
I've also tried it this way:
=Query(SheetA,sheet1!$A:$I,"select I WHERE A=3",-1)
This answer courtesy of #AdamL (thank you, sir!). This was his answer that I found does work very well. When QUERY isn't directly referencing a range in the same spreadsheet, use Colx notation rather than column letters:
=QUERY(importrange("NameofGoogleSheet","SheetTabName!A:Z"),"select Col9 where Col1=3")
If referencing dynamically, use something like:
=QUERY(importrange("NameofGoogleSheet","SheetTabName!A:Z"),"select Col9 where Col1="&D19)
It is also important to note that you must first connect the sheets to each other. Until this is done, you will get column errors, etc. This is done by selecting a cell of the sheet that will display the data, and putting in an IMPORTRANGE on it, which opens a dialog for connecting them. More info: https://support.google.com/docs/answer/3093340?hl=en
I also realized (duh) that I was being stupid to have two separate files for each. I only need two sheets within the same document; 1 to serve as the database and the other to display the formatted data. I am using this for a pedigree application.
I had a Formula Parse Error problem. My mistake was that I had two brackets on my formula. I deleted one set, and it was fixed. I am not sure why, but it worked for me.
EXAMPLE:
=SUM((AB450,AB432,AB422,AB415,AB405)) - THIS GAVE ME A FORMULA PARSE ERROR.
=SUM(AB450,AB432,AB422,AB415,AB405) - THIS IS THE ONE THAT WORKED

Resources