Short summary: I'm trying to give a user access to edit a Pivot Table created from a BigQuery Connected Sheets connection and running into problems. When the user tries to access the Pivot Table, all of the Pivot Table controls are grayed out.
Here's my BigQuery setup:
Project: sales_reports
Dataset: all_sales
This is for sales for the entire company
Table: salesWithProductDetails
This contains sales data for the entire company
Dataset: dept_x_sales
This is sales for dept_x
Table: dept_x_sales
This is a Table created via a query on all_sales.
e.g. SELECT * FROM `sales_reports.all_sales.salesWithProductDetails` WHERE STARTS_WITH(customer_no, "W")
View: dept_x_sales_last2Years
e.g. SELECT * FROM `sales_reports.dept_x_sales WHERE fiscal_year >= extract(year from current_date) - 1
Next, I have a Google Sheet, with a Connected Sheets connection to the dept_x_sales_last2Years
And I created a Pivot Table from it. It works great for me.
But I want to give someone else (let's say "Bob") access so:
They can adjust the Pivot Table as they see fit so they can do sales analysis
They only have access to the dept_x_sales_last2Years raw data
I've tried following the examples on Google's docs on creating authorized views but it's not working.
I've done the following:
Gone into IAM and given Bob a BigQuery User role for the Project.
In IAM, given Bob a BigQuery Job User role for the Project.
In BigQuery and given Bob a BigQuery Data Viewer role for the Dataset.
In BQ and made the dept_x_sales_last2Years an Authorized View.
If I'm using the Sheet as "Bob", the Pivot Table selectors are all grayed out. And if I try to go to the Connect Sheets tab and even do a Refresh preview, I get an error "You do not have access to the connected BigQuery table."
I've also tried:
In BQ, made Bob a BigQuery User for the dept_x_sales Dataset
In BQ, made Bob a Project Editor
In BQ, made Bob a BigQuery Admin for the dept_x_sales Dataset
What am I missing?
The requirements fit the Authorized Views option.
An authorized view allows you to share query results with particular users and groups without giving them access to the underlying source data. You can also use the view's SQL query to restrict the columns (fields) the users are able to query.
This involves creating a new dataset and adding a view to that dataset that references the original dataset.
You assign Bob the project-level bigquery.user role which does not give them the ability to view or query table data in the dataset containing the tables queried by the view. But allows them to run jobs.
You give Bob bigquery.dataViewer on the dataset with the authorized view.
Lastly, you authorize the view to access the source dataset.
Steps are from a tutorial by Google.
Related
I made a Google Form for employees to use to clock in and out each day. The data is going to a Google Sheet, which is turned into a pivot table and all is well except for how to view which employees did not clock in on a specific day. Ideally, I want a list of absent employees per day/employees who did not clock in/out on a certain day.
The Google Form has employees select their name from a drop down menu and select clock in or clock out. The data goes to a Google Sheet, which I have made a data processed tab from, to make a pivot table from. The list of absent employees does not need to be within pivot table, it can be a seperate tab. If it is possible to have absent employees listed somehow in the pivot table, that's great. Not a big deal if not.
Right now, I am manually going in and selecting employees who clocked in/out on a particular date, adding that to its own column, and comparing that column with the master employee list. Is there an automated way to do this? I am familiar with comparing two columns, but can't figure out how to sort employees based on the date they clocked in/out into one column to then compare it to another one (unless I manually create column at end of work day). Thank you!!
https://drive.google.com/file/d/1v5ssyIaW0fUdIBTKTr6FNZIzV1WNilqN/view?usp=sharing This is the raw data from Google From
https://drive.google.com/file/d/1axWe_nPSTvIPM2RvIz7AQZE_NSJmIEdQ/view?usp=sharing This is processed data which fills pivot table
https://drive.google.com/file/d/13rBxzJ5RtnYc-vo3RzocMrSwtMy9kbaB/view?usp=sharing This is pivot table
I’ve just inherited a google sheet from a client where they’ve put multiple campaign performance data tables next to each other in a single sheet. I need to sum up the metrics into another sheet. The problem is that there are around 107 campaigns currently active and if I start summing them up the regular way with something like =sum(A2,D2,G2,etc) it’ll take me a long time to get it done AND there would be no guarantee of accuracy.
I’ve made some sample data which looks like my client data. Link to sample data: https://docs.google.com/spreadsheets/d/1DtcYbkdHgcOH-IzEaD4UsWT2upujx8qD4AC8LErlM-U/edit?usp=sharing
In the data tab, I have a sample of the campaign data. You can see that there are multiple sections where each section represents a campaign. In the consolidated sheet, I’ve shown the end result that I need to work towards - a daily summary of all campaign data.
I need a solution which will scale up to 107 campaigns whose data is recorded in this one single sheet in a similar format. I appreciate any help that I can get with this project!
You can use the Query formula to get the desired output:
=QUERY(ARRAYFORMULA({Data!B4:F6;Data!H4:L6;Data!N4:R6}), "SELECT Col1, Sum(Col2), Sum(Col3), Sum(Col4) GROUP BY Col1 ")
I have only added 3 tables as example, you can add more as required
I created a pivot table in Google Sheets that pulls student enrollment and attendance information from a report that we download from the state reporting system. I run this report multiple times a year to look at a variety of information. The columns always stay the same, but the rows/cell values change each time I run the report. When I paste the data over the data that I used last time, the pivot table goes blank. There is no easy way to identify what data has changed and the report contains thousands of rows of data. I tried re-selecting the pivot table data range, but the pivot table is still showing as blank. Is there a way to update the data without having to rebuild the pivot table in Google Sheets? I can't share the sheet I am working with since it contains confidential information.
I'm using multiple Google Sheets to set up a logging system for the transfer of students between classrooms during a study period. A master spreadsheet (I call it Spreadsheet A) contains a record of all the students in the building and the teacher to whom they are assigned, and each teacher has their own separate spreadsheet (Spreadsheets B1, B2, etc.) tracking only the students assigned to them. There are more than 100, which is why I opted for separate spreadsheets rather than giving each teacher a tabbed page in Spreadsheet A.
Teachers can request that a specific student be sent to them for help by entering their name next to the student's name on the master list (Spreadsheet A). When this happens, the student's name is added to a list on the spreadsheet of the teacher making the request (so that's Spreadsheet B1). Separately, the student's regular homeroom teacher sees the student's name highlighted on their page (Spreadsheet B2), and sees which teacher made the request. Spreadsheet A feeds all the information to the various Spreadsheet Bs
This is all done and built. However, we want to include a time-tracking function, to make sure that students are moving in a timely fashion and not disappearing. Currently, the teacher receiving the student enters the time they showed up on Spreadsheet A, but this is cumbersome. The teachers want a way to enter arrival times on their own pages, and have it visible to the sending teacher & the administration.
So, I want the main Spreadsheet A to pull data from teachers' Spreadsheet Bs, look for students who have arrival times listed, and then copy those arrival times into a data column next to the students' names on the master list on Spreadsheet A. That will, in turn, propagate out to their homeroom teacher and administrator, so they can see who's coming and going, and how long it's taking them.
Oh, and there are nearly 2,000 students, so there's no way to put in a search string name by name. It has to be a blanket formula that says:
If there is data in column K (an arrival time) on Spreadsheet B1 (and all other B-series spreadsheets),
Then use the data in column H (the student's name),
Find a match on the master list on Spreadsheet A,
And copy that data from Spreadsheet B1 into column F (Arrival time test) on Spreadsheet A, next to the appropriate student, but
Do nothing if there is no data in column K.
Is this even possible?
Test demonstration page:
https://docs.google.com/spreadsheets/d/1F2HYmGv8Vfw9TDeAI2eNmv73jCD-lWcfhKZvWM8-r58/edit#gid=0
The pages for each teacher can be opened from the links in the second page tab.
So far, I've tried to compile all of the data from the existing teacher spreadsheets (B1, B2, etc.) into one list as a page on Spreadsheet A. I thought this would then make it easier to match the names and times, but it always throws an error message, no matter what formula variation I try.
=QUERY({Importrange("1y4GjGnUK9usYCNnSClYl2piFgMlbn07wWClrgZnl6Ms","’Teacher page’!H6:K");Importrange("1dNNZR0GvskBU2WG2N348EGFDbHN2aK9kWmxhoQNmn2M","’Teacher page’!H6:K")},"Select Col1, Col2, Col3, Col4 where Col1 is not null ")
This produces: "Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: Col2"
=QUERY({IMPORTRANGE("1y4GjGnUK9usYCNnSClYl2piFgMlbn07wWClrgZnl6Ms","Teacher page!H6:K");IMPORTRANGE("1dNNZR0GvskBU2WG2N348EGFDbHN2aK9kWmxhoQNmn2M","Teacher page!H6:K");IMPORTRANGE("1buhv3AAi6apWIg_-uZv_BzDvyOEvpkxTmO5is-Yhxi4","Teacher page!H6:K");IMPORTRANGE("1b-kEed3zFcZIg3eldcT0x0JXgiwfWNUou_N0ntPsVEg","Teacher page!H6:K")})
This produces a result, but only from the first Spreadsheet B (B1) queried. It doesn't include the results from the other three sheets in the test version. I still have no idea how I'd merge the data from that data collection to the original master list.
I am using power query to get my tables from an external workbook. When I create a slicer for one of my pivot tables the other pivot tables don't show up in the pivottable connection. I want to have one slicer for multiple pivot tables and I am not sure why the pivot tables isn't showing up. Any help would be awesome!
A slicer can only connect to a pivot table that uses the same pivot cache. Chances are that if you don't see the other pivot tables in the slicer connection, they are using a different pivot cache.
If you use Power Query to get the data, make sure that you add the query to the workbook data model. Pivot tables that are created from the data model will share the same pivot cache.
Given you don't have PowerPivot installed (or don't have the DataModel that is built in to Excel 2013 or later) then you've got two options:
Join both data sources in PowerQuery on a common field, so that you
bring in just one Table. Then everything will be on the same
PivotCache (allowing Slicers) if not PivotTable.
Use one VBA routine to limit slicer selection to one item only, and another routine to sync slicers across different PivotCaches.
If you elect for the latter, then Jerry Sullivan's code from this link will limit users to selecting just one item in a Slicer, and my code from https://stackoverflow.com/a/39604425/2507160 will then show you how to sync this Slicer to other Slicers on different PivotCaches, in order to keep all Pivots showing the same thing.