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

numbers that cant be summarized

Status
Not open for further replies.

giggles7840

IS-IT--Management
Mar 8, 2002
219
US
xir2/xp

ive created a count of days between two dates. however to get those dates i had to create them using variables. now that i have my count of days, i need to create an average between of those dates for the column. if i create a formula then is says the fields can not be summarized. If I try a running total the field that i need to average is not available and if i try to click insert--> summary there is no option for that.

how can i turn those numbers into numbers that can be summarized?
 
You need to show the content of the formulas you used (and of any nested formulas).

-LB
 
its basically what you had me do for another report.

@reset
whileprintingrecords;
datetimevar constgo := {events.ActualDate};
datetimevar notice := {events.ActualDate};
datetimevar deliver := {events.ActualDate};


@accum
whileprintingrecords;
datetimevar constgo;
datetimevar notice;
datetimevar deliver;


if {events.ExtendedStage} like "*002" then
constgo := {events.ActualDate} else
constgo := constgo;

if {events.ExtendedStage}like '*098' then
notice := {events.ActualDate} else
notice := notice;

if {events.ExtendedStage} like '*040' then
deliver := {events.ActualDate} else
deliver := deliver;

@construction
//{@constgo}:
whileprintingrecords;
datetimevar constgo;

@notice
//{@NOTICE}:
whileprintingrecords;
datetimevar notice;

@deliver
//{@DELIVER}:
whileprintingrecords;
datetimevar deliver;

@go
{@NOTICE}-{@CONSTRUCTION GO}

@drop
{@NOTICE}-{@DELIVER}

@go and @drop give me the days between dates. i need to average the go column and the drop column separately.
 
Can you reference the thread? I see no reason for using variables here.

-LB
 
The only reason I used that method in the other thread is because you wanted a list of items (more than one item per row) aligned with each other. Is this for a different report? If you only need to to do an average of datediffs, I would not use this approach.

-LB
 
it is for a different report. im not sure how to do date diff?
 
What is the group field? Can I assume there is only one value for each of the three conditions for each group instance? Maybe you should show some sample data.

-LB
 
i have 4 groups. im trying to pull 3 dates out of a list of detail records so that i can figure days between those dates.

the detail records look like this:
constr 2/20/09
constr 2/20/09
constr 2/20/09
deliver 3/5/09
deliver 3/5/09
deliver 3/5/09
notice 5/7/09
notice 5/7/09
notice 5/7/09
closed 7/24/09
closed 7/24/09
closed 7/24/09


now i need to pull out the dates:
constr will display 2/20/09
deliver will display 3/5/09

then i need to take those dates and create 2 new columns.
the first column called DAYS will be the @notice date - the @constr date.

the second column will be a %. {@Go Days}/{@days}*100.


the @go days is another column on the report which is a formula that looks like this:
Local StringVar skd:= right({table.Code},1);

Switch (
skd="A",69,
skd="B",83,
skd="C",76,
skd="D",71,
skd="K",69 )

now we have a report that looks like this:
go days days %
69 76 91
47 63 75

to complete this piece each one of these columns will need an average place in the group 3 footer. all the info above is displayed in the group 4 footer.

let me know if i have left out any info.
 
I was looking for the report structure--groups by field name, etc. It would also be helpful to see what field is causing the details to repeat. I'm guessing that your sample display is a set of data within group #4. Create formulas like this:

//{@constgo}:
if {events.ExtendedStage} like "*002" then
{events.ActualDate}

//{@notice}:
if {events.ExtendedStage}like '*098' then
{events.ActualDate}

//etc.

Then you can reference these in formulas in the group header or footer for the purposes of calculation:

maximum({@notice},{table.group#4field})-
maximum({@constgo},{table.group#4field})

-LB
 
right, but with the way that the data lays out, it will only see the first formula and then ignores the rest. Just like the way the data behaved in

thread767-1565197: Turning data on its side

to pull the dates out the way i need them seems to only work with the formula example you originally gave me.

 
Not true. Did you try this? At the detail level, you will see dates only for those rows that meet your criteria, but at the group level, you will see the desired results.

-LB
 
in the detail section i see the dates. in the group header i get the first date displayed and the other 2 dates are blank even though they do show up in the detail section. I tried placing the new formulas in all 4 of the group headers and that did not make a difference. none of the formulas show up in the group footers.
 
You should only be placing formulas that contain summaries like the following in a group header (in this example, in the group #4 header/footer):

maximum({@notice},{table.group#4field})-
maximum({@constgo},{table.group#4field})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top