ideas for creating a report - 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

Related

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.

How to make a Line Chart with multiple Series where one series has null values

I have a line chart that has 3 series - the first shows cumulative sales for last week - the next shows the daily sales for this week and the next shows cumulative sales for this week.
This shows the days of the week at the bottom.
Last weeks cumulative sales show fine as there is data for each day of the week.
For this week's daily and cumulative sales I don't want a point drawn if the day hasn't happened yet.
I loop through the days of the week and if the day hasn't happened yet I want to assign the value to null instead of 0 and I don't want the line to show anything for these series if the day hasn't happened yet.
Does anyone have advice on this point?
After much looking I found how to do this. It was very easy and described in the below documentation from shieldui.com:
Example using null in dataSeries
I had earlier tried all manner of sending empty strings, null value strings and in the end it was as simple as setting that data member to null like this and shieldui handled it correctly:
dailyincome = null;

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.

Custom drilldown

Good evening.
Please tell me how to write a custom drilldown.
There are city (City), every city has the number of births (Amount) for each day (for example: in the last month), the values ​​of today there is empty
Here is an example of MDX query to the summary table:
SELECT NON EMPTY {[MEASURES]. [NEW_MEMBERMEASURE1], NONEMPTYCROSSJOIN ([Week]. [H1]. [Week]. & [NOW], [Measures]. [Amount])} ON 0, NON EMPTY [DayName]. [ H1]. [DayName] .Members ON 1 FROM [HISTORYBORN]
The names of the rows are the days of the week (Monday, Tuesday ... Sunday)
The first column with values ​​- the average number of births in all cities on a certain day of the week
The second column with values ​​- the total number of births in all cities in the days of the week (ie. If today is Wednesday, the value of all days except Monday and Tuesday will be empty)
Question:
What I have to write in the "Drilldown Expression" in the "Axis Options" to a double click, for example on Tuesday,and it will display a list of cities and the number of births at Tuesday !of this week! without columns with average values ​​(first column) and of the city, in which this day has 0 born children.
The names of the city in the next level
[City]. [H1]. [Name]
Thank you.
Your quetsion is not very clear but I hope it concerns custom drilldown concept in DeepSee.
You can manage custom drilldown behaviour via pivot setting in Analyzer.
As I see you have at least two separate dimensions in your cube:
Week and City.
Suppose you want to see data in weeks and then to go into cities of a particular week.
To make it do following:
Create new pivot.
Drop Week level on the Rows section
Click on the settings button of Rows
Add custom drilldown expression with following line:
[City].[H1].[Name].Members
Enjoy your custom drilldown with cities after weeks.
Please see this chapter in documentation for details.
Use drillthrough with custom SQL listing.

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