Build a x/y Table with QUERY - google-sheets

I would like to create a x/y Table out of my QUERY Database.
I just don't know how to do that or what to google for..
It should be possible to create a graph like on the right side.
And I guess I can only do this by creating such a chart above,
which I have no clue how to build that..
Here the Google Sheet to play with:
https://docs.google.com/spreadsheets/d/1prpRS-NHXSXPxzcSh2pgvHiOatkkyIO5Qb0QRDQrWsY/edit?usp=sharing

You can use pivot inside QUERY to achieve a result like that:
=QUERY(B4:D;"SELECT C,SUM(D) where C is not null group by C pivot B";1)

Related

How to use Column Value as header in Query in google sheet

I was trying use query to show results as below. But I couldn't figure out how to use Column A (months) as a header.
I knew how to use Vlook or Filter function to generate same results. Since my data is huge, I prefer to use Query function to keep my data flexible. Thank you for helping.
https://docs.google.com/spreadsheets/d/1ljrMdM4m0YT35EP7HxY-Gdj9SrEv6DHoQw_qL8Z9c-Y/edit?usp=sharing
Something like this should work, needs tweaking with ordering though.
=query(Sheet1!A1:C71,"select B, sum(C) group by B pivot A")

Converting data into specific table - Google Sheet - problem

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

Google Sheets Double Lookup

I'm trying to figure out a way to lookup specific information from different tables. I have one table with teams and the points they have scored depending on the Week.
A second table with the Schedule and Matchups
I'm trying to cross reference the two tables so I can enter information in a third table.
I first was trying double VLOOKUP, but I'm not sure if that is possible as I wasn't having any success. I'm able to get an Array that is close to the information I need so I can perform the VLOOKUP, but I'm unable to perform the second VLOOKUP to get the score of TEAM B.
I was able to solve this issue with a helper column to combine the information, but I'm trying to avoid that.
Demo Sheet: https://docs.google.com/spreadsheets/d/18LKD_IwfulaSSAdHJ6qtISCF5kY4IgD32lJzZqKfqfY/edit?usp=sharing
This formula will work in just the top left corner of your "opposing" results table as demonstrated in the new tab called MK.Help.
=ARRAYFORMULA(HLOOKUP(VLOOKUP(B18:B19&C17:F17,{B11:B14&D11:D14,E11:E14;B11:B14&E11:E14,D11:D14},2,0),C3:F5,SEQUENCE(ROWS(B18:B19),1,2),0))
You could try to put this formula on cell C18 and drag to down and right:
=ArrayFormula(VLOOKUP($B18,$B$4:$F$5,MATCH(INDIRECT(ADDRESS(MAX(IF($B18=$B$11:$B$14,(C$17=$D$11:$E$14)*ROW($D$11:$D$14),"")),IF(MAX(IF($B18=$B$11:$B$14,(C$17=$D$11:$E$14)*COLUMN($D$10:$E$10),""))=4,5,4))),$C$3:$F$3,0)+1,0))
I have already put the answer on your sample sheet.

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?

Make Vertical Data Horizontal on Google Sheets

I've downloaded a CSV file which I've imported into Google Sheets. It appears that it has imported in a vertical manner.
I want the data to be horizontal like this for example
Is there any way I can do this easily?
Easy way:
Use Pivot table. Put Year in columns and Entity in rows. More here.
More complex:
Use the query formula with the pivot functionality. More here.
=QUERY(A2:C, "select A,avg(C) where A is not null group by A pivot B")

Resources