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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

chart labels to show date range

Status
Not open for further replies.

draacor

IS-IT--Management
Jul 17, 2007
69
US
I have a chart that shows current week and previous week's data. It is a vertical bar chart, on X axis it shows the following labels:

Agent - Current Week
Self Service - Current Week
Agent - Previous Week
Self Service - Previous Week

The formula i use on change of for the graph is as follows:
if ({tickets.open_date} >={?01StartDate} and {tickets.open_date} <= {?02EndDate})
then
if isnull({tickets.source}) or {tickets.source} <= 0
then "Agent - '{?01StartDate}' to '{?02EndDate}'"
else "Self Service - Current Week"
else if ({tickets.open_date} >=({?01StartDate}-7) and {tickets.open_date} < {?01StartDate})
then
if isnull({tickets.source}) or {tickets.source} <= 0
then "Agent - Previous Week"
else "Self Service - Previous Week"


My question is there a way to replace previous week and current week with the actual date range that is entered in?
 
To show the date range selected, create the following two formulas:

"Agent - "
Totext(Minimum ({?Date Range}),"MM-dd-yyyy") + " to " +
Totext(Maximum ({?Date Range}),"MM-dd-yyyy")

//AND

"Self Service - "
Totext(Minimum ({?Date Range}),"MM-dd-yyyy") + " to " +
Totext(Maximum ({?Date Range}),"MM-dd-yyyy")

//Then add the formula as so:

if isnull({tickets.source}) or {tickets.source} <= 0
then @AgentPrevWeek
else @SelfServiePrevWeek

Let me know if you have any questions/issues.
-Carrie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top