Google Data Studio: Different fixed, dynamically-generated date ranges for each metric column in a table - google-data-studio

I have a Google Data Studio table where the data range for the entire table is set using a control. It looks like this:
Page
Unique Views (after 7 days)
Unique Views (after 30 days)
Unique Views (after 90 days)
/page1.html
9
9
9
/page2.html
7
7
7
/page3.html
7
7
7
But I'm trying to set a different date range for each Unique Pageviews column, so the data would look like this:
Page
Unique Views (after 7 days)
Unique Views (after 30 days)
Unique Views (after 90 days)
/page1.html
9
32
101
/page2.html
7
14
76
/page3.html
7
21
37
I see how to set the date range at the report/control/table level (docs), but I haven't found a way to set the date range at the table column level.
Am I missing something or is this simply a limitation of Data Studio?

One approach is to perform a blend with three tables (all from the same data source, in this scenario the sample Google Analytics data source), but each with a different custom date range, one for each date range required (7 days, 30 days and 90 days); each date range will be dynamic, shifting automatically, daily:
1) Blend
Table 1
Table 2
Table 3
Dimension: Page
Dimension: Page
Dimension: Page
Metric: Unique Views Rename with suffix (after 90 days)
Metric: Unique Views Rename with suffix (after 30 days)
Metric: Unique Views Rename with suffix (after 7 days)
Date Range: Custom (Advanced - Last 90 Days)
Date Range: Custom (Last 30 Days)
Date Range: Custom (Last 7 Days)
2) Join Configuration
Join Description
Table 1 🔗 Table 2
Table 1 🔗 Table 3
Join Operator
Left Outer
Left Outer
Join Condition
Page (Table 1) 🔗 Page (Table 2)
Page (Table 1) 🔗 Page (Table 3)
Image
To summarise, the blend will be:
3) Table (Chart)
Data Source: Blend
Dimension: Page
Metric 1: Unique Views (after 7 days)
Metric 2: Unique Views (after 30 days)
Metric 3: Unique Views (after 90 days)
Publicly editable Google Data Studio report (sample Google Analytics data source) and a GIF to elaborate:

Related

Google Analytics (GA4) transaction data not accurate

1. Background
Using GA4 without GA360
2. Description
When i want to search the records by transactional level (Record by datetime) which will show the detailed record one by one, the event count is varied following by filtered date.
3. Hope to Achieve
I would like to achieve a normal report that will show every event count as 1 by filtering months or longer.
4. Weird Cases
Event count of every record is 1 when filtering 0.5 month, eg 1 Oct to 16 Oct.
Event count of every record is 2 when filtering 1 month, eg 1 Oct to 30 Oct.
Event count of every record is 3 when filtering 1.5 month, eg 15 Sep to 30 Oct.
5. Supporting
It is the sampling data from reports.
Heavily Sampled exploration
This report is based on 9.52% of available data. A smaller sample size means that the data in this report is less accurate. Learn More

Need to add dynamic columns in headers in SSRS report

I need to add column headers in SSRS report but that are dynamic in nature.
For example, sometimes Query will return 5 different named columns with it's data and sometime will return 9 different named columns with it's data and so on.
So how to drag or refresh columns in Dataset and how to show in SSRS report dynamically.
I am totally confused seen many articles but not able to get solution.
How to implement this in SSRS report. I have the query, depending on parameters columns gets generated. Check below sample report preview
its showing date in different columns
In SSRS , the dataset must always return the same number of columns with the same names and datatypes, so you cannot of what you want directly.
You have two options.
Option 1
Normalise the data.
So instead of returning something like
SomeID ColumnA ColumnB ColumnC
1 10 20 30
2 15 25 35
3 100 200 300
You need to return
SomeID ColName Amount
1 'ColumnA' 10
1 'ColumnB' 20
1 'ColumnC' 30
2 'ColumnA' 15
2 'ColumnB' 25
2 'ColumnC' 35
3 'ColumnA' 10
3 'ColumnB' 200
3 'ColumnC' 300
Once you have your data in this format, you can simply use a matrix in your report. Set the rowgroup to SomeID, set the Column Group to ColName and the data value to Amount
This is by far the simplest solution.
Option 2
Deconstruct and rebuild the table in code
There are several drawbaks to this method but if you are interested, read my answer to this question asked a few days ago
SQL Server - SSRS - Display the content of a Table/View directly in the report (and not using table/matrix)

I need to provide a tabulated output of this month, month+1, month +2, and month +3 derived from numerous tables within the one sheet

The History:
I have a data set that refreshes every Monday morning adding last week's values to a growing tally until there is 52 weeks in the data set (9 separate cohorts), across 38 different departments.
I have built a power query to filter the department and compiled tables for each cohort, limiting the data to the last 17 weeks, and using excel forecast modelling then setup each table to forecast 16 weeks ahead.
Because the week beginning (WB) dates keep changing IO cant hard code the result table to cells within each cohort table.
My result table needs to show current month, month +1, month +2, and month +3 forecast values as per the highest date closest to or equal to EOM and I need this to be automated, hence a formula.
PS added complexity is that the table has date/value adjacent in (last 17 weeks) and columns separated in future 16 weeks of data in each table. Structure is exactly the same across all the 9 cohort forecast tables.
My Question:
Am I best to use a nested EOM formula, or VLOOKUP(MAX) based on the cohort_forecast_table image link below?
Because the current month needs to be current I have created a cell using =NOW().
I then complete a VLOOKUP within each cell in the master table that references the references the data in each sub-table usin MAX and EOMONTH for current month, then month+1, month+2, month+3, etc.
In a simplified broken down solution:
Date array = 'D3:D35'
Volume array = 'E3:E35'
End of current month formula cell B3: =MAX(($D$3:$D$35<EOMONTH(D1,0))*D3:D35)
Call for result in cell C3:
'=VLOOKUP(B3,Dates:Volumes,2,FALSE)'
I think this will work for me and thank you all...

Calculating a % rate based on two date dimension in one cube

Set up - SSAS 2012 with OLAP cubes (built by supplier) and MS Report Builder v3. No access to BIDS.
I am building a report which needs to calculate a disposal rate based on data from a single cube. Historically this would have been calculated from two separate tables of data, giving a count by month of new items by date recorded and a count by month of items disposed by month of disposal. This can then be turned to a disposal rate using a lookup or similar.
Blank disposal dates are fine (can take months to dispose of items).
I would like to keep this in a single query so that I can introduce extra dimensions to analyse the data and represent it multiple ways easily. My suspicion is that I need a calculated member but I am not sure where to start with these. Any help would be greatly received - I am trying out a few things and will update this should I solve myself.
Simple formula would be
=(sumif(Items, DateReported="July 2014"))/(sumif(Items, Disposal Date="July 2014"))`
So the following data...
Month Recorded Month Disposed No of Items
May-14 May-14 25
May-14 Jun-14 3
May-14 Jul-14 45
Jun-14 232
Jun-14 Jun-14 40
Jun-14 Jul-14 46
Should produce...
Month No Recorded No Disposed Disposal Rate
01/05/2014 73 25 34%
01/06/2014 48 43 90%
01/07/2014 45 91 202%
My current MDX statement:
SELECT
NON EMPTY { [Measures].[No of Items] } ON COLUMNS,
NON EMPTY
{
([Date Reported].[Calendar Months].[Month].ALLMEMBERS
*
[Disposal Date].[Calendar Months].[Month].ALLMEMBERS )
} ON ROWS
FROM [Items]
You can use LinkMember to move a reference to one hierarchy (like [Date Reported].[Calendar Months]) to another one (like [Disposal Date].[Calendar Months]), provided both hierarchies have the exact same structure. Thus, only using [Date Reported] in your query, the calculation can use [Disposal Date]. The query would be like the following:
WITH MEMBER Measures.[Disposed in Date Reported] AS
(Measures.[No of Items],
LinkMember([Date Reported].[Calendar Months].CurrentMember, [Disposal Date].[Calendar Months]),
[Date Reported].[Calendar Months].[All]
)
MEMBER Measures.[Disposal Rate] AS
IIf([Measures].[No of Items] <> 0,
Measures.[Disposed in Date Reported] / [Measures].[No of Items],
NULL
), FORMAT_STRING = '0%'
SELECT { [Measures].[No of Items], Measures.[Disposed in Date Reported], Measures.[Disposal Rate] }
ON COLUMNS,
[Date Reported].[Calendar Months].[Month].ALLMEMBERS
ON ROWS
FROM [Items]
Possibly, you would want to adapt the column titles in your report. I left that out and used member names that desribe more what they do than what should be shown to users.

How to sum SSRS Matrix Columns on Row Group

I have a report that displays the total hours a person worked for each project they are assigned to, aggregated on month. I would like to sum the total hours for each person, for each month, in SSRS 2008 R2. So, for example, I have the follow data and would like to column totals like so:
January February March
Worker 1
Project1 50 80 20
Project2 30 10 60
Project3 10 40 5
Total: 90 130 80
Worker 2
Project1 20 40 60
Project2 10 30 10
Porject3 30 10 50
Total: 60 80 120
Everything I have tried so far either sums each column for all workers combined (summing by 'Month' column group) or sums all hours for each worker (Summing by 'Person' row group).
For completeness, my row groups are:
Person
Project
RowGroup
My Column groups are:
Month
ColumnGroup
I know that I can create another query/data set to do this, but I was hoping that SSRS can do this fairly easily. It seems like a trivial problem and perhaps I am just missing something.
Any help would be great or perhaps this is something that SSRS can't do.
If you are trying to add a Column containing totals, it is pretty simple just
right click on cell --> Totals --> Column
As shown here

Resources