How to Sum the values of a field based on month and year? - crystal-reports

Crystal Report
Report
The report shown have two fields month and year. How can I sum the values of Count field after every month?

You can use Running Total Field that available at the field explorer
1) The name of the field. Let say {Table A.Count}
2) Choose SUM

Related

how to count row in crystal report

I've got data as picture below, i'm using crystal report to display statistic report from that data.
i want to count MRN which got 2 until 5 rows of episode number only.
currently im doing
1) group MRN in crystal report and count(episode number).
2) create 1 formula like :
if count(episode number) >=2 and count(episode number)<=5 then count(episode number)"
3) put the formula to report and try to insert summary to count that formula, but no selection summary appear for that formula.
Can you give me an idea how to count MRN with 2 until 5 episode only? refer to picture for clear explanation
In Crystal you can use two condition types to sort which records are being showed:
Record selection formula
Group selection formula
Both are located in the menu Report > Selection formulas
In your case you can define a group on field MRN and create a Count field inside that group. To show only groups where the count is between 2 and 5, use the Selection Formula > Group condition in the Report menu.
Count ({EpisodeNo},{MRN}) <=5 and Count ({EpisodeNo},{MRN})>=2

How to create a calculated field in Tableau?

I'd like to create a bar chart where each bar's height is determined by a calculated field and each bar represents a certain month.
The formula for the calculated field is the aggregate of the 'amount' field but is filtered based on the following criteria for each bar.
The data is filtered for all items that have a date less than the last day of the month.
Currently, I've tried the following:
After creating a calculated field, I've entered the following text: SUM([Account MRR])
However I'm unsure how to have the calculated field reference the last day of the month in the column.
Place your Date field in the filters shelf. Then choose the date you want..

Sorting summarized field into bins

I have created a report grouping on the Finished Goods Item Number field fg_item_numb. It contains the columns Fg Item Number, invoice date, invoice #, Qty invoiced.
I have created a formula field # of days invoiced, which calculates the number of days we actually invoiced each item.
Distinct count ({#date invoiced,{invlin.fg_item_numb})
I have a list of items numbers and the number of days each item was invoiced.
Now I want to sort the items into bins based on the # of days invoiced (e.g. <50, 51-100, >100).
However, Crystal won't let me calculate these using the # of days invoiced field.

Crystal Reports Dynamically Grouping by Date

I'm relatively new to Crystal Reports and it seems like this should be easy, but I haven't been able to figure it out after a lot of googling. I'm working on a report in Crystal Reports XI that will show total hours logged by support staff for a date range and show sub totals by week, month, or both depending on the user input. My report is currently arranged as follows:
Group 1 Header - Support Staff Member
Group 2 Header - Ticket Closed Date with section printed monthly
Group 3 Header - Ticket Closed Date with section printed weekly
Group 4 Header - Ticket Category
Group 4 Footer - Sum of time logged in each category for the week
Group 3 Footer - Sum of time logged in all categories for the week
Group 2 Footer - Sum of time logged in all categories for the month
Group 1 Footer - Sum of all time logged
My original idea was just to suppress the header and footer for groups 2 and 3 when they weren't needed, but if I manually do that it still prints the records by week and month. Is there a way to not have the grouping at all unless the parameter says to show those totals? Or if that isn't an option, how would I use the parameter to change whether the group prints records weekly or monthly?
Thank you
Best option would be create a string parameter 'option' with values weekly and monthly.
Now create a formula grouping.
If ?parameter='weekly'
Then //your weekly code here
Else if ?parameter='monthly'
Then //your monthly code
Now use this formula in grouping instead of multiple groups.
Now when user selects option your grouping will change dynamically.
Hope this helps

Jasper iReport Designer, weekly average

I am working with iReport Designer and want to ask how can I calculate an average sum of a column based on a date?
I am working on a report which has a database containing a table two columns: 1st is "sample_time" which has DATE values and the second is a "watt" which has an int value.
What I want to do is take the "watt" column and show it as average on the report (which I can do), and then show the same column "watt", but from averages based on the dates from the other "sample_time" column.
Lets say I have the dates from 2008-01-01 to 2008-01-20 and I want to do a weekly average, lets say from 01-01 to 01-07, how can I do that?
Well, i think this can get easily achieved using JasperReports Groups. You can create a group based on you sample_time column, and calculate the average for each group (which means, for each date, its just like doing a group by on a SQL query). Here there are two quick tutorials:
JasperReports Groups || The Groups