Make the variable to be shown in the chart customizable - google-data-studio

I have a Google Sheets dataset and I'm creating a Google Data Studio report out of it (and I'm a beginner).
I need to create 3 filters, similar to this I did on Google Sheets:
First and second are alright, just adding the filter and selecting the metric.
However the third one should select the metric to be analyzed in my chart, so it gets to look like this:
And the metrics to be analyzed are the ones in yellow in my sheets database:
If I understood correctly I need to leave dimension as customizable variable to the user among a set of variables.
Is there a way to do that?

I didn't find a proper way to do that in Google Data Studio.
The best way I found was to add an Optional Metric chart by chart. It is not ideal because I wanted a single metric filter for all charts.

The other way to do it would be to unpivot your original data. Add a new color name indicator that will have the column names. And then have all the values in a single field. So your rows will increase by 3x amount and you will have 2 less columns. Then you can add the indicator field as a filter.

Related

Limit the number of rows counted in in google data studio

I have a scorecard that looks at the number of URL clicks driven by all queries which works as expected. I am now trying to display the number of clicks driven by the top 10 queries in the scorecard. I was able to limit the number of rows in my table by disabling pagination to show only the top 10 queries but now I'm looking to sum the clicks in a scorecard to provide a quick summary rather than having a table.
I don't think what you want to do is possible dynamically via just the Search Console connector. Google Data Studio does not provide any way to calculate rankings via calculated fields, so there's no way for you to know which query is in the top 10 without looking at a sorted table. A few imperfect alternatives (roughly in order of increasing complexity):
You apply a filter so that the score card only aggregates values above a certain threshold. This would be hardcoded, so you would be filtering on the Clicks (ie aggregate all URL clicks above 100)
You apply a filter to the score card so that it only aggregates clicks from the top 10 URLs. This would not be a dynamically updating filter, so you'd have to look at the table to see which URLs are in the top 10, which would change as time goes on. This would end up being a filter like: "Include URLS Contains www.google.com,www.stackoverflow.com"
If you do not mind using google sheets as an intermediary, you could dump your Search Console data into a spreadsheet so that you can manipulate it however you like and then use the spreadsheet as the data source for data studio (as opposed to the Search Console connector). It looks like there might be some addons out there that you can use out of the box although I haven't used it myself, so not sure how difficult it is. Alternatively, you can build something out yourself via the Google Script and the Search Console API
You could build a custom Data Studio Community Visualization. (BTW just because they are called 'Community Visualizations' does not mean you have to make them publicly available.) Essentially here, you would be building a scorecard like component that aggregates the data according to your own rules, although this does require more coding experience. (Before you build one, check if something like what you need exists in the gallery, but at a quick glance, I don't see anything that would meet your needs.)

Does Apache Superset support Weighted Averages?

I'm trying to use Apache Superset to create a dashboard that will display the average rate of X/Y at different entities such that the time grain can be changed on the fly. However, all I have available as raw data is daily totals of X and Y for the entities in question.
It would be simple to do if I could just get a line chart that displayed sum(X)/sum(Y) as its own metric, where the sum range would change with the time grain, but that doesn't seem to be supported.
Creating a function in SQLAlchemy that calculates the daily rates and then uses that as the raw data is also an insufficient solution, since taking the average of that over different time ranges would not be properly weighted.
Is there a workaround I'm not seeing?
Is there a way to use Druid or some other tool to make displaying a quotient over a variable range possible?
My current best solution is to just set up different charts for each time grain size (day, month, quarter, year), but that's extremely inelegant and I'm hoping to do better.
There are multiple ways to do this, one is using the Metric editor as shown bellow, in this case the metric definition is stored as part of the chart.
Another way is to define a metric in the "datasource editor", where the metric will be stored with the datasource definition, and become reusable for any chart using this datasource, as shown here
Side note: depending on the database you use, you may have to CAST from say an integer to a numeric type as I did in the example, or multiply by 100 in order to get a proper result that's useful.

Reference to cells within several tables (named range within named range etc..)

I'm writing a spreadsheet to track performance through time. As there is several iterations for each dates, it was way better for the eye to show each ones in a table and not everything in just one row. The result is a sheet where for each dates there is a table :
This is a reduced version for this present post, there is more columns and more rows for each dates (otherwise, yes, it could have been on one row only).
Each time we'll make a new evaluation, we'll copy a table in this FullData sheet, put it after the last one, and change the date.
As this sheet is very dense and because I'll later create graph of some indicators on time, I want to create a simplified sheet (Overview) that "receives" the data from the previous FullData sheet. The aimed table looks like this :
As you can see, the goal is to sum up each tables of the FullData sheet, in one row in the Overview sheet.
Ideally, it will automatically appear as a new line to the Overview, if there is a way to make it "detect" a new table/date.
I'm quite unskilled at spreadsheets. I get the mechanic but I'm super ignorant about the different functions. I explored around INDEX, Dynamic Cross Tables (I translate from french, not sure it's exactly the english name) and have the big intuition Named Ranges are in play here.
As the tables will always have the same size, there is maybe a way to indicate the date cell with a constant increment formula?
I get this isn't the only question here, It's my first post and feel free to tell me if it's not narrow enough, I just wanted to provide a wide view on the situation.
To sum up the questions I identify (for what I discover with spreadsheets, there is always a new question I didn't think about)
How to select the informations I want from the FullData sheet to the Overview one, in a way that will be easy to repeat each time I create a new table/date?
Is this possible with the "basic" functions, avoiding macro/script (it would be another world to me)?
Can automatic the process can be? Spectrum of automation : I just copy a new table with a new date and the selected data appear in the Overview <> I tweak the copied table each time, by naming it and/or adapt the formulas of it's original version.
Thanks for your reading of my non-technical, non-totally english prose.
try:
=QUERY({FullData!B2:B\
{QUERY(FullData!L2:Q; "offset 2"; 0);
{""\""\""\""\""\"";""\""\""\""\""\""}}\
{QUERY(FullData!L2:Q; "offset 3"; 0);
{""\""\""\""\""\"";""\""\""\""\""\"";""\""\""\""\""\""}}};
"where Col1 is not null and not Col1 matches 'Amount|Duration'"; 0)

Using Google Sheets to split data from a column into different sheets

I work at a private international school which wastes a ton of paper. My goal is to reduce that by using google sheets to collect students lunch data from teachers, rather than writing it on paper weekly, then having someone input it all manually, then make separate sheets for each student manually.
I want to make this more efficient by using google sheets.
My google sheet 1 has all the students' data for a whole month with all their names and data in what I expect is a normal format. How can I use the google sheets split function to read the column with their names in, and separate data with the same name into its separate sheet?
Screenshot of preliminary data
The picture shows the student's name repeating which will happen 4 or 5 times, depending on the month. Rather than manually separating them, I imagine there is a script I can use on google sheets to automatically read each repeated name and separate it into its own sheets.
How do I do this?
The information you provide in fact has some opportunities but, I generate a data sheet for you to verify, I believe it represents the data you have.
In regard to your problem you can use a wide range of solutions one common is the:
Filter Formula
Here is some information on how to use it.
So finally here is a proposed answer sample with this formula so you can check the full configuration of the solution.
You can also just copy paste the data you have in to it, if it has the same structure and it will dynamically adapt to your information. You can also copy this spreadsheet to make it private to you on File> Make a copy.
Other formulas you can use is QUERY or VLOOKUP
If you need further assistance you can contact one of stack overflow members through Stack overflow or you can join a social group like this facebook group where we attend this kind of questions.

Is it possible to use LookupSet/Lookup with Running Value in SSRS

This is my first question on StackOverflow so apologies if there is not enough appropriate information.
Rather than having four different tables that I try to position 'just so' so that they look like one table, I was hoping to have all of my data in one visible table and hide the rest.
To do this I was trying to use LookupSet/Lookup with Running Value (I need a cumulative figure for each fortnight from a start date).
I have used the following code which supplies me with figures in the table - however the figures seem to be nearly double what they actually are.
=Lookup(Fields!StartFortnightDate.Value, Fields!StartFortnightDate.Value,
Fields!RowIdentifier.Value, "KPI004")
Is it possible to use Lookup with RunningValue? It won't let me use ReportItems either its obviously only pulling from the first box and therefore is just repeating the first figure again and again.
Any help, guidance, or even a simple "it's not possible" would be appreciated.
Edited to add more information as suggested:
It's difficult to add example data without worrying about data protection etc.
Report design is currently:
ReportDesign
Each table has it's own dataset - I'm trying to get them all into one table.
Lets say the first dataset is number of cars sold in each fortnight.
The second dataset (table) is number of meetings held.
The third dataset is number of days weather was sunny/cloudy/rainy etc.
(This obviously isn't what the datasets are, but I'm trying to show that they don't actually relate to each other that much and therefore can't all be in the same script)
All datasets have a table of the fortnightly dates within that quarter, my hope was to get one table that showed the cumulative figures of each item even though they're not in the same dataset - the tables are all grouped by the StartOfFortnightDate.
The script =RunningValue(Fields!NumberOfFordCarsSold.Value, Count, Nothing) and similar works fine in the separate tables, however if I add a row to the top table and try to use RunningValue with Lookup it doesn't work.
When I used the script mentioned at the top (Lookup script) I get inflated figures (top row of this image) compared to the expected figures (bottom row of the image): IncorrectAndCorrectFigures
Apologies if this doesn't make sense, it's likely that my complete confusion in trying to find the answer is coming across in the question.
If the resulting datasets are all similar then why can you not combine them?
From the output they seem to be just Indicator & Date.
Add an extra column to indicate which set of data each row belongs to (Cars Meetings etc), this might help with grouping rows in the report.

Resources