Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is it possible to measures two different time spans

Status
Not open for further replies.

jschill2628

Programmer
Nov 3, 2009
156
US
Is it possible to measures two different time spans. Say I want to compare FY 09 to FY 10. Is there a way to do this?
 
Hi,
It is hard to answer if no information is provided about the datasource, the structure of the data tables,the data itself etc.

Help us help you..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Are you wanting to compare the time between Date A & Date B to the time between Date C & Date D? If so, a DateDiff would give you the number of days or hours or minutes between Date A & Date B, and would express it as a number. Another DateDiff for Date C & Date D would give you another number and these could then be compaired.

PS. It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options. In this case, it probably makes no difference.


[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Sorry I wasn’t very clear, I am not quit sure how to explain this.

First off, I am using crystal 2008.

Second I currently have my users select a date range to see data for their hospital, is there a way to be able to select two sets of data.

For example if I want to compare Jan 2009-March 2009 to Jan 2010 – March 2010.

Now I realize I can probably not do this in one graph, but maybe graphs that sit side by side. So you can see visually, and see the counts.

EX:
January 2009 January 2010
10 indicants 16 indicants

February 2009 February 2010
25 incidents 5 incidents

March 2009 March 2010
45 incidents 15 incidents

Is there a way to get this done?

Thank you in advance!
 
Sure, but what is the prompt text for the date range? Are you asking the user to select only from one year of data and then you are showing the previous year, or something like that?

-LB
 
The users are currently selecting a data range (parameter), i then point the parameter to the create date.
 
Please try again. If you want data from Jan to March from two years, how do you plan to work in the date range? Are you asking them for the Jan to March of a certain year or for an entire two year period? Again, what is the prompt text you are using?

-LB
 
I am not sure I am reading this correctly, but my users are currently allowed to select a date range. This is created by using the field explorer, and creating a new parameter field. Once the prompt is created in the selection criteria I point the prompt to the create date field. All the users see is two date blocks, on which the can click on the built in calendar to get any date the want.

Currently if they want to “compare” data they would have to pick Jan 2009 through March 2010, this would give them 14 month worth of data. What I want to do if it is at all possible is to give them two date ranges that they can pick from, and set up one graph to come from the first set of prompts, and the second graph to come from the second set of prompts, allowing them to see side by side the date range that they want to compare.

I hope I answered your question and explained this situation a little better.
 
Ok, so I am fouling around with this a little more, and I realize that I cannot put two different date ranges in the report, because in the selection criteria I would have

{IRSCLAIM.REPORT_DT} = {?Report Date} and
{IRSCLAIM.CREATE_DT} = {?Create Date} and

And there is NO incident that meets both of these criteria. Is there a way around the above example?
 
Why are you now adding two different date fields into the mix? What is the logic? This has nothing to do with earlier posts that I can see.

-LB
 
I want the user to be able to compare two different times. I want a bar chart on top of a bar chart, so they can easily see that there were 125 incidents in FY09, but only 34 incidents in FY10.

OR Jan 09=10 Jan 10=6
FEB 09=5 FEB 10=25
March 09=6 FEB 10=2

I don’t know how else to do this. I want the user to be able to select two different time ranges. I want to be able to create a comparison report.
 
You didn't answer the question. Why are you using both a report date and a created date? What is the logic? If you want ranges from two different years, you could something like this:

(
{IRSCLAIM.CREATE_DT} = {?DateRange1} or
{IRSCLAIM.CREATE_DT} = {?DateRange2}
)

Also, are you saying you want a stacked bar chart to compare ranges across years? If so, create a formula like this:

totext(year({IRSCLAIM.CREATE_DT}),"0000")

Select bar chart->stacked, and the add the year formula as your first "on change of" field, then add {IRSCLAIM.CREATE_DT} as your second on change of field->group options->on change of month. Then add your summary field.

Then right click on the chart->chart options->data labels->choose label and value.

-LB
 
LB you are the GREATEST!!

One more stupid question.....is there a way to get two seperate graphs out of this mess. So say I am comparing Jan 09 through March 09 to Jan 10 through March 10. Right now they are in the same graph, which is great, but my users are not the brightest, is there a way to seperate these out into two graphs, one for DateRange1 and on for DateRange2?
 
What I really want to do, and I realize now I may not have given you enough information is, I want to add an elimaent to the first graph, so i would need two different graphs that show each time frame, and the elemnts that I wasnt to showcase such as injusry (the number of incidents by injury by month)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top