In report builder while computing the sub totals - by default it groups for all the data set - report

In report builder while computing the sub totals - by default it groups for all the data set.
if you see for 23rd december i am getting "something" 3 times, so instead of giving the count of 3 its giving me 9 because for that particular date i have "something" 9 times in my database, hope this helps .
Attaching the report for reference. We need the sub totals of only the count highlighted in report body for the respective dates.
We tried grouping the numbers
Tried handling using the sum expression

Related

ideas for creating a report

Colleagues, I really need your advice on how to create a report with the following format in Cognos Analitics:
I only have the value "amount of money" and the dimensions "date" and "Person", and I need to display in the report the value for a specific date, and the change from the previous date.
for example, 01.02.2018 Person1 had 50 of the money, and 01.03.2018 Person1 had 61, so field № 3 is equal to 11 (61-50).
As you can see, there is no "change" column after the first field, because there is nothing to compare it with.
Do you have any ideas on how to generate such a report?
P.S. user selects the start date and end date of the report independently in the invitation
Maybe try creating multiple metrics
Call the first Day 1 Amount
Call the second Day 2 Amount
Call the third Day 3 Amount
You could even define each metric relative to the other
Day 1 is based on the date selected
Day 2 is for the prior day
Day 3 is 2 days before... etc
Build the crosstab slightly different. Instead of placing the metric in the middle
place them side by side
Then you can run calculations, %difference, growth etc on the fly

Generate a Content Drilldown report with weeks in columns

I'm trying to create a report in Google Analytics, drilling into Content Drilldown.
Figure there are 200 second level page-path-levels I'm working with. Right now, if I select a time period, say last 12-months, then drill into Content Drilldown, I see my ~200 domains/directories in the left column, followed by columns for pageviews, unique pagesviews, agv time on page, bounce rate and exit %. However, I want to see all of 2018, with columns breakout out week by week.
For the moment, I only care about unique pageviews.
The ONLY way I can see to do this right now is to run the report for week period, export to excel, then do it over and over 52 times to get a year.
Is there a way to run this report, but only ONCE, with unique pageview total showing week by week in columns? I would have 52 columns and 200 rows.
A perfectly fine alternative would be to generate a report with the path-level & day (or week) concatenated in column A, with column B having the unique pageviews. A report like this would be 2 columns, with 10,400 rows (200 x 52). We could clean up this raw data in a spreadsheet.
Pick "Week of Year" as your secondary dimension. Make sure you set the rows to match the number of results and export to excel.

Tableau Weighted Average Per Capita Calc not aggregating right

I am trying to create a simple revenue per person calc that works with different filters within the data. I have it working for a single record, however, it breaks and aggregates incorrectly with multiple records.
The formula I have now is simply Sum([Revenue]) / Sum([Attendance]). This works when I only have a single event selected. However, as soon as I select multiple shows it aggregates and doesn't do the weighted avg.
I'm making some assumptions here, but hopefully this will help you out. I've created an .xlsx file with the following data:
Event Revenue Attendance
Event 1 63761 6685
Event 2 24065 3613
Event 3 69325 4635
Event 4 41996 5414
Inside Tableu I've created the calculated column for Rev Per Person.
Finally, in the Analysis dropdown I've enabled Show Column Grand Totals. This gives me the following:
Simple Fix
The problem is that all of the column totals are being calculated using the SUM aggregation. This is the desired behavior for Revenue and Attendance, but for Rev Per Person, you want to display the average.
In Analysis/ Totals / Total All Using you can configure the default aggregation. Here we don't want to set all of them though; but it's useful to know. Leave that where it is, and instead click on the Rev Per Person Grand Total value and change it from 'Automatic' to 'Average'.
Now you'll see a number much closer to the expected.
But it's not exactly what you expect. The average of all the Rev Per Person values gives us $9.73; but if you take the total Revenue / total Attendance you'd expect a value of $9.79.
Slight More Involved Fix
First - undo the simple fix. We'll keep all of the totals at 'Default'. Instead, we'll modify the Rev Per Person calculation.
IF Size() > 1 THEN
// Grand Total
SUM([Revenue]/[Attendance])
ELSE
// Regular View
SUM([Revenue])/SUM([Attendance])
END
Size() is being used to determine if the calculation is being done for an individual cell or not.
More information on Size() and similar functions can be found on Tableau's website here - https://onlinehelp.tableau.com/current/pro/desktop/en-us/functions_functions_tablecalculation.html
Now I see the expected value of $9.79.

BIRT Designer: Determining Percentage of Total for Values in a Column

I have a data set in BIRT Designer with two columns, one with day of week abbreviation names (Su, M, Tu, etc.) and the other with numerical representations of those days of the week starting at 0 and going to 6 (0, 1, 2, etc.). I want to determine what percentage of the total number of rows that each day of week represents. For example, if I have 100 total rows and 12 of those rows correspond to Su/0, 12% of the total rows are made up of Su.
I would like to perform this same calculation within BIRT and graph (bar graph) those percentages that each day consists of out of the total. I'm just learning how to use BIRT and assume that I need to do some scripting either when making my data set or when specifying the rows when making the chart. Any tips would be greatly appreciated.
Use computed columns.
Edit Data set > Computed Columns
The simplest way is to put one column that counts every row, for each day of the week. You can have a separate column that adds a count if the day of the week is a specific values
if (row["Day"] == "Su"){
1
}
I should add: that you can use a 'data' element in your table to compute the percentage. A 'Dynamic Text' item could also be used, but the data item gives you a binded value that you can make better use of later if needed.
Edit
To get a total row count, us a computed column I name mine 'All'
For the Expression use the value "1"
With some inspiration from James Jenkins I think I found my answer. It was pretty simple in the end, but all I needed to do was make a new computed column and instead of adding an expression, I simply set the Aggregation to "COUNT". That counts all of the rows in your table and puts that total on each row. That way you can use that total in any calculations that you may need to do. I have added a screenshot for clarity.

Date Diff Function Assistance in Tableau

I'm using Tableau Software to create a calculated field off of a database, which will be used to dynamically filter the data. Basically, if the date of birth is above 18 as of today, they should be filtered out.
I'm trying to get in a positive integer the difference between the date of birth of an individual (expressed in the database as [DOB]) and today in years. Once I return that date, I would like to evaluate whether it is above or below 18 years. I've been creating a date diff function, but I don't understand what I'm missing.
DATEDIFF('year',DATETRUNC('year',NOW()),DATETRUNC('year',[DOB]))
References:
http://onlinehelp.tableausoftware.com/v7.0/pro/online/en-us/functions_functions_date.html
First of all, you need to modify your calculated field slightly so that it returns a positive integer instead of a negative one.
DATEDIFF('year',DATETRUNC('year',[DOB]),DATETRUNC('year',NOW()))
With that done, right-click in the Dimensions pane and create a new calculated field as follows:
IF [Age] < 18 then 1 else 0 END
Then drag this second calculated field on to the Filters shelf. When you do that, you'll get a pop-up window where you can select your filter values. Click the checkbox for "1", then OK and that should filter out everyone who is aged 18 or over.
The following calculated field returns true if and only if the person is 18 or more as of today
datediff('day', [DOB], dateadd('year', -18, today())) >= 0

Resources