I have a crystal report that uses two groups for counting sales by year & month. I would like to know how to display the summaries across the page rather than down.
2009
jan 15
feb 5
etc,
2010
jan 30
feb 18
I would like the report to be as follows:
2009 2010
Jan 15 30
Feb 5 18
Thank You
You can use Cross Tab like this:
right click to your report white space > Insert > Cross-Tab...
Select columns, Rows, Fields to Summarized whatever fields you want.
Then move it to Section 4. Good Luck!
Related
I am looking for DAX expression to show me monthly figure for last financial years. Here is an example of the information;
The figure is accumulated since the starting of 31 Jan 2017 or earlier which I have no information. The data I have does not have a monthly view but Year to Date (YTD).
How could I structure the DAX so that it would be able to find out what is the figure for the month.
For example, Jan 2017 $2,000 , Feb 2017 $5000 (included figure from Jan 2017), March 2017 $8000 (included Jan 2017 and Feb 2017).
How can it be done to have the monthly view ?
Date............. Balance Sheet Amount.......View
31-Dec 2017................24,000.......................YTD *1
31-Jan 2018................24,010.......................YTD *1
28-Feb 2018................24,310.......................YTD *1
31-Dec 2018................30,000.......................YTD *2
31-Dec 2019................31,000.......................YTD *3
31-Dec 2020................40,000.......................YTD *4
30-June 2021................5,000.......................YTD *5
Let's say your current table does not contain previous balance, then it will be easier to obtain the current month movement with the following formula:
Current Month = Sheet1[YTD Bal] -
CALCULATE(SUM(Sheet1[YTD Bal]),
FILTER(Sheet1,Sheet1[Index] = EARLIER(Sheet1[Index]) - 1))
Before you start the dax calculation, you will need to add index column first and here is the output:
Im trying to design a dashboard wherein I need a parameter to control 2 things.
If I select "Rolling 12", I should be able to see the last 12 months of my data with respect to current month. When I select "Rolling 12-2", I should be able to see
last 12 months of my data but excluding the latest 2 months. E.g If I'm in January 2018 then I should be able to see data excluding Jan 18 and Dec 17 (from Jan 17 to Nov 17). I have tried some techniques but without success. Can anyone help. Thanks.
Reference Tableau Workbook attached at link :
Using the Superstore sample data (I don't have 10.5 installed), I created the following boolean expression which you'd put in the filter shelf for True.
Give a parameter called rolling, create calc field as follows:
if [rolling] = 'Rolling 12'
then DATEDIFF('month',[Order Date],{max([Order Date])}) < 12
ELSEIF [rolling] = 'Rolling 12-2'
then DATEDIFF('month',[Order Date],{max([Order Date])}) < 12
and DATEDIFF('month',[Order Date],{max([Order Date])}) >= 2
end
Adjust the date name for your date field.
I have some data in table SSTemp like this ("..." indicates data omitted for readability):
Month Year Number Gross Net
1 2013 1 1,000 500
2 2013 1 1,000 500
...
12 2013 1 1,000 500
1 2014 1 1,000 500
2 2014 1 1,000 500
...
12 2014 1 1,000 500
1 2015 1 1,000 500
...
12 2015 1 1,000 500
I am new to Crystal Reports and am using version 8 (no, we can't upgrade). I want to roll up the totals for all line items in years past and leave the data as-is for the current year in the same report. Database field {CONTROLFILE.CURRENTYEAR} contains the current bookkeeping year for our system which is vital to determine the rollup groups. The CONTROLFILE table contains general settings for the system and has no data in it useful for JOINing, however I need to consider CURRENTYEAR for the grouping. The MONTH column should be blank on the summary lines, and indicate month on the current year lines. The end result data should look like this:
Month Year Number Gross Net
2013 12 12,000 6,000
2014 12 12,000 6,000
1 2015 1 1,000 500
2 2015 1 1,000 500
...
12 2015 1 1,000 500
Any suggestions would be most appreciated!
Use sub report concept.
In main report calculate for previous years in sub report calculate for current year.
In main report group by year And suppress details show summary in group footer in another group footer section place sub report and just place data in detail part don't group
I've created a report using the crosstab control which groups the data by date in columns. I'd like to take all of the dates that are earlier than the 1st of the current month (when the report is run) and combine them and the data being summarized into one column called Previous.
So instead of seeing something like this:
Oct Nov Dec Jan Feb Mar Apr May Jun Jul
I've see something like this:
Previous Jan Feb Mar Apr May Jun Jul
Is there a way of doing this in CR XI?
You would have to create a formula to do this (or probably two formulas one to get them in the correct order and another to display the correct string):
grouping formula: if {table.datefield} < currentdate then '0000' else cStr({table.datefield}, 'yyMM')
display formula: if {table.datefield} < currentdate then 'Previous' else cStr({table.datefield}, 'MMM')
ADDED SCREENSHOT
The answer was actually a modification of Lee's answer.
if {Command.ReqDate} < date(year({?StartDate}),month({?StartDate}),1) then dateadd('m',-1,{?StartDate}) else {Command.ReqDate}
use this to group on in the CT set to monthly
right click on the column header
select Format field,
select common tab
select display string formula
if currentfieldvalue < date(year({?StartDate}),month({?StartDate}),1) then 'previous'
else totext(currentfieldvalue,'MMM')
I'm trying to take one group and put it in two different columns. I know you can do that for the details of a group in the section expert but it won't allow you do so for a group. The group is date that I've separated by months for the all of last year and this year to the current date and I want last year's months in one column and this year's months in another column. Like this:
January 2011 January 2012
February 2011 February 2012
March 2011 March 2012
April 2011 April 2012
May 2011
June 2011
July 2011
August 2011
September 2011
October 2011
November 2011
December 2011
That way the months are easy to compare and they can be drilled down. Any ideas?
In Details section's 'Section Expert', select 'Format with Multiple Columns'
Select the (now visible) Layout tab
Select 'Format Groups with multiple column'
Add a second group on your date field by year (make sure it is 'outside' the mm/yyyy grouping)
Size the footer of the section you created in #4 to get each year to be in its own column
If you group by month name (like monthname({transaction.date}) so January 2011 and 2012 will be in the same group) then you can use a running total to summarize the years individually within that group. You can do this by creating two running total fields, one with an evaluate formula like year({transaction.date})=2010 and another with the formula year({transaction.date})=2011.
Note that running totals won't work in the group header though, so you'd need to migrate those fields down into the group footer instead.
How about using a cross-tab like:
2011 2012
January 10 12
February 5 12
March 8 1
This would be a lot more flexible.