How to calculate monthly difference in a metric? [closed] - google-analytics

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 days ago.
Improve this question
I am using Looker Studio to visualize my data and I need to create a table with a monthly granularity that shows the month-over-month (MoM) difference in a metric called "metric". The MoM difference should be calculated as the current month's value minus the previous month's value. Is there a way to achieve this directly in Looker Studio without creating a new BigQuery table?
Example table:
year-month
metric
metric MoM
Jan 2023
10
{calculated value}
Feb 2023
8
-2
I have tried using the "Comparison Date Range" feature, but it doesn't seem to work in a table and also it compares the current year with a previous one which is not a solution I am looking for.

I was trying something similar and found that one way to achieve it is blends. Create a blend with month as dimension and your metric as metric. Join it with a second table that has the same structure, but instead of the month, it displays the previous month with a calculated dimension like
MONTH(date) - 1
Perform the join on the month dimension of both tables. The resulting blended table. Contains the Month, the metric of this month and the metric of the previous month. Now you can easily calculate your difference.

Related

Optimization: 2 Objective Constraints [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I am working on an optimization problem. The objective is to determine the optimal number of target hires (COUNT below) to set per recruitment sourcing channel that would yield the lowest number of attritors (ATTRITORS below) at the end of each month and at the minimum sourcing cost (COST below). The constraints would be that the the total Count should equal 600 and that all channels should be utilized.
Given the two objective functions, is this something that can be accomplished using R, Solver, or any open source tool?
I tried formatting a dummy data and it would look something like this:
enter image description here
Thanks!
The simple way of dealing with this problem is to quantify the attrition cost. You already have cost per hire, in the same way using your domain knowledge and business conversation try to come up with per employee attrition cost (say first model). More likely depending on skill level per employee attrition cost will be different so for the sake of good approximation you may want to calculate it for each channel and then do average (say second model)
Once you say got per employee attrition cost regardless of channel (first model) then you can simply add per employee attrition cost * total attrition in objective function. In second level model you can do same thing; with channel dimension added, per employee attrition cost for a channel * total attrition for that channel. Based on business interpretation people also go next level: factor * per employee attrition cost for a channel * total attrition for that channel where factor is to adjust the importance of hiring and attrition cost (though I would expect cost to tackle this alone).
you can do this in excel solver OR choose here https://cran.r-project.org/web/views/Optimization.html OR go for commercial solvers like Gurobi, CPLEX with their APIs in R, Python.

Why is a difference between the Firebase Analytics and Google Big query Results for Events Counts how to resolve? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 6 years ago.
Improve this question
There is an event for which Fire base shows events count for the day (16-Oct-2016) is 85989 and when i Query from Google Big Query. It shows on 25000 records from that particular event on the same day (16-Oct-2016).
I used This Query to Get the data
**SELECT
date(USEC_TO_TIMESTAMP(event_dim.timestamp_micros)) AS Event_date
,event_dim.name as Event_Name
,Count(event_dim.name)as Total_Events
FROM
(TABLE_DATE_RANGE([MyDataSet imported from firebase],TIMESTAMP('2016-09-05'),TIMESTAMP('2016-10-24')))
WHERE
event_dim.name IN ('Specific Event Name')
GROUP BY
Event_Name,Event_date
order by Event_date asc**
Why is this difference in the results Please help me to identify this.
It's impossible for people to help here, as we don't have access to your data sources.
So I suggest you to export raw data for that particular day from both sources, and compare them. Then you can find which one is incorrect, and then ask specific question to either firebase or google, like "My data source is like X, and my query is like Y, but I get unexpected result of Z".

What is the best tool to see a website peak? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I want to know what time my website has been more visitors. How can I check this peak? Can I do with google analytics?
Yes you can do this with Google Analytics. Please note that there are steps that Google takes to prevent you from getting analytics at a level detailed enough to violate the privacy of a user, so you may not exactly get the answer you want if you have too long of a history, or too few users visiting over the period you are analyzing.
The other thing you need to be careful of is that most data is geared toward sessions whereas your question is asking about visitors.
The best way to measure this sort of data is if you have unique advertising identifiers, cookies, or a login page that is being captured in a way that allows you to track a unique visitor as it navigates through your site, and treat that separately from a user who double clicked on a particular page. If you have a database, or log files, or an event strip, or even are able to capture ip addresses somewhere of where the visits are coming, along with timestamps, this can help you get the answer you're looking for better than can be achieved directly from Google Analytics.
Another caveat with GA is that the data may continue to trickle in over 24 hour period or longer, so if the spike just happened, you'll want to wait a while before making a final analysis.
With Google Analytics, if you are trying to investigate a single peak in your data on a single day, and that day occurred at least 24 hours ago, then here's an example of one way to get time-segmented traffic data for a website:
Log on to Google Analytics
On the left hand side click to expand the "Audience" tab and click on "Overview"
select the date range in the top right for instance April 1 - April 1 2016
slightly below that select "Hourly" instead of day (top right of the chart)
In the top left, click on Users instead of Sessions.
You should now see an hourly view of the traffic over the period of April 1.
I've attached a screenshot of this final page, taken from an old Google Analytics account that is tracking a defunct website (which is why there are so few data points)

Freezing Previous Years Data

I have a database that tracks employee’s data for the current year and previous years.
In examples below I will use calendar years (years start in Jan and end in Dec)- this is not always the case, some users have their year running from July to June- or April to March, etc.
There are many tables that, with a few heavy calculations, make a view of the employee’s data at this point in time.
This current year’s data is what users look at mostly. But data from previous years impact on this year (so, a change made to the 2008 data- will have a knock on effect on 2009, and then into 2010 and so onto this year).
Obviously, this has a negative impact on performance when viewing reports as viewing this year’s data will mean trudging through all the previous years- calculating and creating views until the end result is found. As the application ages, this problem will get worse and worse- say in 2015, anybody using the system from its inception (2008) will be waiting for a long time to get their data.
We plan to freeze previous years data so instead of having data from 2008, 2009, 2010 and this year’s data- we would have one block with the previous year’s data (with all calculations done for those previous years) and this year’s data.
In this way, we would have the end results data for all the previous year’s already calculated and we would only need to add to this year to get the final result.
Obviously, we would have to prevent users from entering/updating data in previous years.
My question is what is the best way to achieve this? I presume you would need some process that waits until the new year and does some calculations.
Thanks in advance,
ViperMAN.
the approach you describe is normally referred as data archiving, you can have some queries a DBA runs manually every year the first working day after the new year party so the calculated data is prepared and stored.
Also, your application needs to deny users to modify previous years data, if I have got it right.
One approach I was thinking works as follows:
Create a table that holds the result of the previous years calculations.
Prevent all addtions/deletions/updates to previous years from the app tier.
Change reporting so that queries would consult this table instead of trudging along, calculating everything out each time.
Have a daily process that would:
Check if today was the first day of an employees year-
If yes, get all of the elapsed year's data and add them to all the previous years.
Obviously, this is a simlified version- but one that I think could work.
Thoughts?
If you have data that should not be edited, and you can define what that data is, then I would use a combination of stored procedures and security settings to ensure the old data stays accurate.
If you used stored procedures as a filter, you can have logic in your stored procedure that checks the record against the current DateTime and only allows the update if everything fits your requirements.

I'm trying to find a CRM with some specific features [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
I already looked at a few including Zoho, Salesforce, Sugar, and Epesi. Each one of those was either to expensive or was lacking what we needed.
I'm hoping someone out there knows of a CRM that:
Is web based
Has a module for opportunities/sales (they want to be able to record payments and link them to customers)
Has the ability for customizing fields (deleting standard fields & adding new ones), as well as formula based custom fields
Ability to import data from a CSV file and export data as well
Ability to run customized reports
Has a module for customer accounts
Workflow automation. Specifically, they want there to be a field which sets when the customer is due to be billed and have that update every month when the billing date passes. So for example, if the billing date is January 20th once January 20th passes the field should automatically update to February 20th and so on and this should be the process for all customers stored in the system.
Preferably something open source so I can modify the code as needed. My client would be willing to pay a monthly price of up to $30 a month. A one-time upfront cost would be even better.
WORKetc is a web based business management application that combines features of CRM, PM, and billing into system. It integrates these aspects directly so that certain items can be attached to one another, I.E. contacts and projects, timesheets and projects, to-dos and leads, you get the idea.
It's centered around its CRM features, which include opportunity/sale tracking, and these can be integrated with the invoicing/quoting module and also attached to products from the product catalog, and once established as a sale can be turned into subscription sales that bill automatically on a monthly rate.
WORKetc has custom fields, website integration forms, has data import/export in the CSV format, runs business wide reports on hundreds of different forms of data in real time, and has a customer login portal: you can invite an unlimited amount of clients to come in and collaborate on projects, view invoices, follow up on support tickets, etc (based on permissions you set).
Compare with other CRM systems here: http://www.worketc.com/compare
David

Resources