Hey I am really new to google data studio and for this project I successfully added pie chart with contains gender details. As I am using CUSTOMER table which adds gender_id while they fill out the form. Customer tables looks like
Name Email DOB gender_id
David david#gmail.com 08/08/1990 1
Shyam shyam87#gmail.com 09/01/1985 2
Krita krita96#gmail.com 01/01/2000 3
Suja Suja#gmail.com 02/03/1995 2
I used the customer table to count total gender and pie chart displays legend or label as 1,2,3 and 4. Is there a way to change 1, 2, 3 and 4 into male, female, non-binary and dont want to say.
Pie chart looks as
for that you will have to add a new field to your database. The new field must convert the numbers to the respective texts, using the formula:
CASE
WHEN gender_id=1 THEN "male"
WHEN gender_id=2 THEN "female"
WHEN gender_id=3 THEN "non-binary"
WHEN gender_id=4 THEN "dont want to say"
END
Thus, you will have a new column explaining each genre. Instead of using the column with the numbers, use the new field created as dimension of the pie chart.
Related
I've got a dataset with a column containing the id of the shop, another column with the EAN code of the product, and another column containing the quantity sold.
I create a Dataview in VEEML to link that to a calendar with the months and the year.
Can I create a metric on that Dataview to get the average quantity of sold items per shop, per months, years, etc ?
All the filters, dimensions and metrics used by a story could be edited in the pop-up "Datafields".
At the bottom of the left menu, click on the database icon to open the datafields options.
Search the field containing the quantity
Expand that field
Fill the textbox with the right SQL ANSI calculation. Don't forget to add a name at your metric at the end of the calculation using the "as name_of_the_metric"
Check the checkbox Is Metric As
Here, your calculation can be something as :
SUM(Sales_Quantity)/COUNT(DISTINCT ShopId) as Avg_Sales_Per_Shop
In each chart or grid, that calculation will be applied dynamicaly for each level of the dimensions in that chart.
I have 4 column:
Company name
Work done
Work to be done
Revenue
Columns 2, 3 and 4 (Work done, Work to be done and Revenue) are currency expressed in Eur format.
I need to represent this data in a pie chart as 3 different slices (column 2, 3 and 4).
You will need to convert Work done, Work to be done and Revenue to categorical values in a single column, e.g. something like this:
Company name
Type
Amount
a
Work done
€100.00
a
Work to be done
€200.00
a
Revenue
€400.00
b
Work done
€200.00
b
Work to be done
€200.00
b
Revenue
€400.00
This GDS dashboard generates a pie chart using a Google Sheet datasource with these columns and rows. The pie chart dimension is Type and the metric is Amount. Make a copy of the dashboard to see the chart configuration.
I would like use latest date value from my table in Scorecard,
Any idea how to import this Date value in DataStudio report ?
There is no option like "Max Date", similiar to Max value used in Digit Values.
There is only Count option:
Or advice how to insert date as Label to another ScoreCard chart.
2)
One more question: Is it possible to insert date function in Text field? Probably not right ? If I wanna join my line of text with some Date
Hi Nim thanks for help and what about if I want show last data from last 3 days in 2 item dimension table ? In one item I can just use row filter, but how in 2 item ?
In my case for example most 5 countries by last 3 days, by now I can only show most 5 countries by last day:
...Actually I can setup in the bottom option : date range (last 7days), but I have still too many rows, solution should be somehow limit number of rows per day...somehow
Question 1: How to display the Max Date LIKE a Scorecard?
1.1) Data Tab
- Chart Type: Table
- Dimension: Date
- Sort: Date in descending order
- Rows per page: 1
1.2) Style Tab
- Show Header: Deselect
- Row Numbers: Deselect
- Show Pagination: Deselect
- Table Labels Font Size: As required (e.g. 24px)
1.3) Text Box
- Add a Text Box stating Max Date if required
- Precision Movement: Use Shift + Movement keys to finely place the components exactly where required.
Google Data Studio Report and GIF to expand on the above:
Question 1 (Original Post - Currently doesn't work as expected): How to display the Max Date on a Scorecard?
At the Metric field of the Scorecard, create a Chart-level Calculated Field that explicitly aggregates the Date field by MAX:
MAX(Date)
Google Data Studio Report and a GIF to demonstrate:
Question 2: How to display the latest Metric?
2.1) Data Tab
- Chart Type: Table
- Dimension: Date
- Metric: As required (e.g. Sessions)
- Sort: Date in descending order
- Rows per page: 1
2.2) Style Tab
- Show Header: Deselect
- Row Numbers: Deselect
- Show Pagination: Deselect
- Table Labels Font Size: As required (e.g. 24px)
2.3) Overlay
- Add a shape or text box over the Date field part of the Table to ensure that it's not visible and set the colour of the shape to a solid colour that blends in with the background (such as White for a White coloured background).
- Order: Ensure that the shape or text box is placed in front of the Table.
- Precision Movement: Use Shift + Movement keys to finely place the components exactly where required.
Google Data Studio Report and GIF to elaborate:
So I have a database with 5 columns:
Project
Total budget
Authorized to assign
Assigned
Paid
Columns 3, 4 and 5 sum up the total budget; thus each is a part of the total.
I would like to create a pie chart showing the percentage in each step. Would it be possible?
The pie-chart takes 1 dimension and 1 metric so you'll need to transform your data to have the labels in one dimension column and the values in a metric column for it to work in pie-chart format
First at all thanks for reading.
I have a problem in SQL Server Reporting Services with the chats. I am using bar char and I split the info by category = cat_name, then i want to split the bars for the value of that cat_name
Example:
Category group = cat_name
Value = cat_value
So the bar chart displays the info but it just shows 6 rows with the labels the others just show the bar with the value but not the name of the category.
I assumed that the bar chart has 6 rows to display name as default but anyone knows how to increase it as many as categories I have ??
I have many categories with value and the data is fine but I need to display the name of each category too :( and the report just shows me 6.
I can't post pic cause I don't have enough reputation
If all your data is showing (just not all the labels), then that seems to be discussed here under "Displaying all Labels on the Category Axis". It suggests you do the following:
Right-click on the Category axis
Select Axis Properties
Under the Axis Options tab, change Interval to 1.
If the interval is set to Auto, it will select the best interval to show 6 or fewer labels. More details on this here.
If not all of your data is showing, then make sure, under the Labels tab of the Axis Properties dialog, that Auto-Fit is disabled.