cancel
Showing results for 
Search instead for 
Did you mean: 

Summarize a formula with dates

Former Member
0 Kudos

Hi,

I need to summarize records by using a formula that contains dates but it is not available in the summary window.

What are the alternatives?

this is the the dates row in the formula (both date fields are running totals.

and {#Commit. Action Completion Date}>{#Original Commitment Due Date}

Thanks,

B.

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Barry,

You cannot summarize formulas that contain Running Totals or other Aggregation functions.

You would need to create a set of formulas as a workaround.

Could you describe the logic for the calculation?

A sample dataset will be great too..

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

The formula I initially created was:

if {PR_Status_Type.name}="Opened"

and {PR_Status_Type.name}="Pending Action Closure"

and {PR_Status_Type.name}="Pending Compliance Approval"

and {#Commit. Action Completion Date}>{#Original Commitment Due Date}

The dates are running totals.

The idea is to count records that are either in each state above and also one date is bigger (or after) the second one.

Thanks a lot,

B.

abhilash_kumar
Active Contributor
0 Kudos

If you're trying to 'count', then try:

whileprintingrecords;

numbervar x;

if {PR_Status_Type.name} In ["Opened", "Pending Action Closure", "Pending Compliance Approval"]

and {#Commit. Action Completion Date}>{#Original Commitment Due Date} then

     x := x + 1;

Place this formula on the details section or the section that has the Running Totals.

Create another formula and place this on the Footer:

whileprintingrecords;

numbervar x;

-Abhilash

Former Member
0 Kudos

Hi,

Some general information:

This is a subreport and i have one group.

The details section is suppressed.

There are some summery fields that are based on formulas.

When I place the first formula in the details section and the second formula in the group footer section some summery fields data is not correct since their formulas contain similar states that appear in the first formula.

The field in question shows values but they are not correct as well.

What can be done so the first formula will be specifically for the second formula and not other formulas in the report?

Thanks,

B

Former Member
0 Kudos

Hi,

After further testing it looks like that the formula that is placed in the details section is printing 17 rows instead of 2 and thus giving me the wrong count in the second formula.

The results should print only two records.

B.