How can I Filter Data in Google Data Studio based on containing 2 or more input options? - google-data-studio

I'm building a dashboard for a dataset that includes a Location column, and I would like the user to be able to filter based on location. The trouble is that some projects are happening in multiple locations, so that the column is comma separated list of locations, making the normal dropdown filter option cumbersome ("NY, Paris" and "Paris, NY" are treated as different values). While this can be overcome by adding a parameter dropdown box and allowing the user to select an option (say Paris) and then using a Contains function to filter the output, the Parameter drop down box only allows 1 selection to be made. So a search for all project happening in either Paris or New York seems like it would have to be done using 2 separate parameters. Is anyone aware of an elegant workaround for this that will allow multiple selections of locations within a single dropdown.
The inelegant solutions I've come up with are:
Use n parameter boxes and cap the locations that can be filtered in a single view at n.
Have users input a comma separated list as a parameter, parse that for locations and then show all REGEXP CONTAINS matches of that provided list.
Example dataset showing multiple locations per project in the locations column:
Edited to add a link to a sample report here. The problem, in a nutshell is that I would like people to be able to select 2 or more location parameters so that they don't have to limit themselves to viewing 1 location at a time.

One way to filter CSVs (Comma Separated Values) is by using the CSV Filter Control Community Visualisation (click on the icon on the toolbar and select to view all):
Data Tab
Column to filter on: Location
Cross-filtering: Select (☑) (this ensures that the CSV Filter Control filters other charts based on the value(s) selected)
Style Tab
OR instead of AND behaviour: Select (☑)
Editable Google Data Studio Report (Embedded Google Sheets Data Source) and a GIF to elaborate:

Related

Excel dropdown values depending on criteria

i'm trying to create a dropdown list that return the values of a big table if a certain criteria is true:
For example, in this example I need the dropdown to list all the names which city is "Bilbao".
If I create a sheet that "lists" all the posible dropdowns (one for each city with the names listed below), there's no problem. But I'm trying to don't use that sheet, I mean, that the dropdown directly calculates the correct list as an array and show it. That's because the real workbook has more than 100 "cities" that can change at any time.
Is it possible or maybe i'm overcomplicating that?
Regards!
You'll need to use a range that your filtered list of values appear in.
The formula =FILTER(Sheet1!$A$2:$A$11,Sheet1!$B$2:$B$11=Sheet1!$D$2) will return just those names that appear in the city shown in D2.
To use it in your data validation add a named range to the Name Manager (Formulas > Name Manager). My formula is in cell G2, so my named range looks at =Sheet1!$G$2# and is named CityFilter.
Now create your Data Validation to look at CityFilter.

MS Report Builder Pareto Chart Unable to sort Categories

I am attempting to build a industry standard pareto chart in MS Report Builder. The chart below is a generic example of what I want to see. The problem is that my categories are not ordered by the transaction_sum for that category, but by the name of the category. If I go to CategoryGroups Collection and specify that the sort expression be based on the transaction_amount field and click OK and run the report chart, it is ordered alphabetically on category. I go back into CategoryGroups Collection and the custom expression is gone and it has reverted to the category. I have found no solution to this issue.
So I thought I would go into the query for the dataset and add a new field ModCat consisting of a single character prepended to the category field i.e. 'ARent', 'BFood', CUtilities', 'DGym', 'ESmall_expense'. I use that as category in my chart and it sorts based one the transaction_sum! Excellent, but I still need to strip that ordering letter from the category labels. So I write a LabelsFormat expression for the vertical category axis that uses MID to remove that first letter. But when I run the report the 'ordering' letter is still there. If I just use the original category field for the LabelsFormat it just ignores it. Am I missing something here? Is it really that hard to create a simple pareto chart in Report Builder? Any inputs are much appreciated. Thank you

Way to calculate difference between Tab Filter and Overall in Google Data Studio?

I have a calculated value in Google Data Studio that a client wants to see as follows:
Result = Value (No filters on page applied) - Value (Filters on page applied dynamically)
I don't know how to calculate or accomplish this in Google Data Studio or if this is possible. Can someone show me if this solution is possible?
There are two workarounds:
Parameters
Instead of using filters, create a parameter1 and a field with the function
Value -
case when parameter1=some_field then Value
else 0 end
Blend
Duplicate the data source and hide all field which shall not be filtered. Blend this data source with the original one and use as joining keys the dimension which are not filtered. Use the field Value in both sets as metrics and rename it as filtered / not filtered.
Add a chart and add in this chart a metric field with a formula substracting these two Value fields.

Data Studio Filter results to rows whose arrays contain two values

I have a table like this:
Name
Array
Dog
[Barks, Furry]
Cat
[Purrs, Furry, Other]
Broken Duck
[Purrs, Feather]
When I use a control and select Purrs and Furry, I get all three rows. The desired outcome is to only get the cat row.
Under the hood in BQ Name is a string and Array is actually an Array<struct<type: string, value:string>> e.g. [{'array_element':'Barks'}] with all type values equal to array_element.
One approach is to use the CSV Filter Control Community Visualisation with the Array field, excluding the [ and ] characters:
Chart (Community Visualisation): CSV Filter Control
Column to Filter on: REGEXP_REPLACE(Array, R"(\]|\[)", "")
Interactions: (Tick) Apply Filter
Style Tab: (Unchecked - default behaviour) OR instead of AND behaviour
Editable Google Data Studio Report (Embedded Google Sheets Data Source) and a GIF to elaborate:

Access Database : Find a value in a form

Situation : I have an Access Datasheet Form which contains lots of fields (30) and about 200 records. Some of those fields are combo boxes which can contains multiple values.
Question : Is there a way to look for a specific value in the whole form ?
I tried to use the Finder ( CTRL + F) but it doesn't locate the values in records containing multiple values.
The only way I know to do this so far is via the Filter for a specific field.
Assuming (because f your reference to Ctrl-F) that you are looking for a solution to a manual 'find' - change the search options to:
I've just tested this on a database I'm using currently and it finds part words in multi-value combo boxes ok.

Resources