How to divide group of field with another group of fields in Crystal Reports graphs? - crystal-reports-xi

I am creating a Crystal Report which consist of a graph. As I am new to this, I might be having problem with a very simple issue.
I have a table which consist of date, actual_rev, hrs_available, etc.
Now what I need in the graph is for each date sum of the actual_rev/ sum of the hrs_available. And this should be done grouping of every single date so that graph shows bar of each date.
In the above example the revenue sums up to 2317.00 and the hours sums up to 15.33 , getting the revenue per hour 151.14, which should be shown in the graph for this date.

Related

How Calculate change rate over time with tabular dataset in google data studio?

I seek your valuable support in finding a way to calculate change rate over time with tabular dataset in google data studio. Here is the link to the dataset: https://docs.google.com/spreadsheets/d/1To1n5JJA6uVkLMgwjKhghJgCJpFmtXkqNog4DzfoEbE/edit?usp=sharing
There are many rows with data stamp and have different categories and sub categories. I have created a change rate table manually based on which I want to create charts in google data studio. The charts will be from the raw tabular data not the separate change rate table that is built only for example purpose.
So the chart could be based on a main category (as in the sample) and can also be viewed as sub-category and show change rate over time between the dates.
The dates can sometimes be months or years. I am not very savy with advanced formulas or scripting but I am hopeful someone here would be able to help me out on this. I will be ever so grateful for this :)
I can only provide you with the quotient of datasets between two days. If you need different mappings between dates (day, months, years), for each the following steps have to be done:
generate a new field "yesterday" with: DATETIME_SUB(date, INTERVAL 1 day)
blend this dataset with itself, using as dimension "date" and "yesterday".
Further dimensions are your categories fields A and B.
As metric, you can use the count of the date field.

Creating Google Sheets pivot tables with custom formula

I am creating table for finance: will have a data base of trades: date open and close for trade (), open and close prices, ticket is a stock name, change is percentage which is calculated base on open-close price and days are also calculated base on two dates as on the picture:
And I need to generate a new table for each month of the year (in which I have date records). So, Google sheets has Pivot tables and that what I need. I need columns: average win % per month, average loss % per month, average number of win days per month, average number of loss days per month.
I did that in 2 separate tables:
First table:
First table settings:
Second table:
Second table settings:
But I can not create that in one table - I do not know how to make custom formula. So, I am looking for some help here.
I tried some things, I can filter, make average. But I do not know how to get array of items with sorted pivot table data by months...If I can get sorted pivot table data by months - I can filter by positive/negative and find average.
My sample: https://docs.google.com/spreadsheets/d/1TCLWZ7-oUSwM8DLODPpH6wwssgfYyo3BVlEpWj78kV4/edit?usp=sharing

How do I get the nearest past date in a range for each entry in another list?

I collect customer feedback for my education business and add it to a Google Sheet. The feedback data has a submission date (A2:A) and some satisfaction metrics, which I visualize in a Google Data Studio dashboard.
The problem is that I want the feedback per cohort, but not everyone fills in the feedback form on the same day. I have a list of all courses with their respective dates (Cohorts!A2:A), and I want to assign each feedback submission to their respective cohort in a new column. It would be nice to also match it to the specific course type and country, but for now matching the cohort date would suffice.
I've tried using VLOOKUP and ARRAYFORMULA to go through the feedback dates and get the nearest past date to take it as the "course date" for that student. All the solutions I've tried either only take a single date or TODAY as a reference, but I have a whole list I'd like to fill in.
From my understanding, you are trying to round the timestamp, then match it to your course table?
To round a timestamp to a date:
=INT($A2)
When doing lookups like you're describing, I frequently end up calculating the nearest week as well - this formula returns the Sunday of the week start. Figured it might be helpful.
=text($A2+CHOOSE(WEEKDAY($A2),0,-1,-2,-3,-4,-5,-6),"m/d/yyyy")

Can Google Data Studio do time-series graphs at the hour level?

Every example of a time-series graph I've seen for Google Data Studio has a metric plotted per day. Is there any way to configure the granularity of the time axis (hour, month, etc)?
I want to show the count of events per hour throughout one day.
My columns are in bigquery as types datetime:TIMESTAMP and count:INTEGER
This is old, but its high in search results, and I found the correct answer here: https://www.en.advertisercommunity.com/t5/Data-Studio/Is-it-possible-to-aggregate-by-hour/td-p/1104815
Click the pencil next to the datasource, on your timestamp, click on the type column, and change "Date(YYYYMMDD" to another format, such as DATE HOUR("YYYYMMDDHH") to get hourly aggregation on the graphs.
Now, there seems to be a straightforward way:
Assuming that you have a Time Series plot, use Timestamp for your dimension and want to show hourly aggregated values.
Select the dimension's preferences:
Change Type to Date Hour
Edit: Based on new updates to Data Studio, #Brian's answer above is the correct one.
You can create a calculated field with the TODATE funciton. Example formula can be TODATE(source_field, 'SECONDS', '%Y%m%d%H'). Then this field should be marked as Date(YYYYMMDDHH) in the field editing screen.
There is a way to do this. If the data is broken up hour by hour, make the hour column(s) the Time Dimension. If all of the hour data isn't in a single column, you may want to reformat your data (manually or using a data prep source, your choice). Or you can go into the time setting of the field and change it into hours.

How to go from individual date/time log to "timeline" graph?

I have essentially a log file in a Google Sheets. Columns are "Date/time", "user", "asset accessed", and there will be multiple entries for the same date, though usually not time.
I'd like to use the timeline graph to show user activity, but the graph requires an aggregate view with one date (no time) per row, with a numeric count in second col. Is there a way using functions within Google Sheets to generate an aggregate "view" of this data and pass this to the timeline graph?
Well, I guess you'll have to create an auxiliary sheet, or just some columns with the summarized values for you chart.
From your description, I'll assume you're using 3 columns (ABC). Let's use columns D, E and F with the following formulas:
=ArrayFormula(Trunc(A:A))
=Unique(D:D)
=ArrayFormula(CountIf(D:D;E:E))
Since date values are actually a number (qtt of days since the epoch), and hours are decimals, the Trunc formula gets rid of the "time" part and leaves only the date. Just format the cells (apparently numbers) as dates and you'll see. Then Unique and CountIf do the summarizing.
There's surely different ways of doing this, perhaps more "elegantly", in a single formula. But I think that in this way it's more easy to understand and learn from. Also, you'll probably need to adapt the ranges to your actual columns positions (I hope that's not a problem).

Resources