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

Date prompt and filters

Status
Not open for further replies.

andresvc

Programmer
Jan 28, 2003
18
MX
Hi everybody.

In my report I want to present 3 metrics:
1) The sales in the last 30 days.
2) The sales between the last 31 and 60 days.
3) The sales between the last 61 and 90 days.

The problem is that I base my study in a date prompt and then I compare this date prompt with the day of the sale.

Example:
Date prompt: 16/01/2005

Sales
17/01/2005-100
01/01/2005-200
15/12/2004-300
15/11/2004-400

Result.
Sales last 30 days 200
Sales last 60 days 300
Sales last 90 days 400

Thanks for your help.



 
This is the script for this problem.

For Sales in the last 30 days.
ApplyComparison ("#0 < #1", [Date DataBase]@ID, ?[Date Prompt])

AND

ApplyComparison ("#0+30 >= #1", [Date DataBase]@ID, ?[Date Prompt])

The rest of the filter is in the same form.

Regards.
 
seems straightforward enough. create 3 filters - each with the conditions you need for each metric.

define the 3 metrics, and add the appropriate filter to the metric conditionality.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top