Announcements
You can succeed best and quickest by helping others to succeed. Join the conversation.
cancel
Showing results for
Did you mean:
Creator III

## Loop, how? Need only in script: average for all dates less current

Need help!

Need only in script: average for all dates less current. Example in excel.

1 Solution

Accepted Solutions
MVP

May be this:

Table:

Date, sub1, sub2, SUM

1/1/2016, 1, 1, 1

1/2/2016, 1, 1, 2

1/3/2016, 1, 2, 3

1/4/2016, 2, 2, 4

1/5/2016, 2, 3, 5

1/6/2016, 2, 3, 6

1/7/2016, 3, 4, 7

1/8/2016, 3, 4, 8

1/9/2016, 3, 5, 9

1/10/2016, 3, 5, 10

];

FinalTable:

sub1,

sub2,

SUM,

Temp1,

Temp2,

Temp1/Temp2 as [Avg Group by Date];

RangeSum(Peek('Temp1'), SUM) as Temp1,

RangeSum(Peek('Temp2'), 1) as Temp2

Resident Table

Order By Date;

DROP Table Table;

2 Replies
MVP

May be this:

Table:

Date, sub1, sub2, SUM

1/1/2016, 1, 1, 1

1/2/2016, 1, 1, 2

1/3/2016, 1, 2, 3

1/4/2016, 2, 2, 4

1/5/2016, 2, 3, 5

1/6/2016, 2, 3, 6

1/7/2016, 3, 4, 7

1/8/2016, 3, 4, 8

1/9/2016, 3, 5, 9

1/10/2016, 3, 5, 10

];

FinalTable:

sub1,

sub2,

SUM,

Temp1,

Temp2,

Temp1/Temp2 as [Avg Group by Date];

RangeSum(Peek('Temp1'), SUM) as Temp1,

RangeSum(Peek('Temp2'), 1) as Temp2

Resident Table

Order By Date;

DROP Table Table;

Creator III
Author

Thank you so much!

Community Browser