Forum

Records related to ...
 
Notifications
Clear all

Records related to other records

3 Posts
2 Users
0 Reactions
162 Views
(@a-alfano)
Posts: 5
Active Member
Topic starter
 

I have a simple table with the quantity for each period of each Activity

TABLE OF QUANTITY

Activity

Period

Quantity

Activity1

1

150

Activity1

2

80

Activity2

5

70

Activity3

6

60

 

I have another table that list the rules to identify the Period and the quantity of other Activity (See Activity Related here below)

TABLE OF RULES

Activity

Activity Related

Period Related (Rule)

Quantity Relate (Rule)

COMMENTS

Activity1

Activity4

Period + 1

Quantity x 90%

 

Activity2

Activity5

Period + 3

Quantity x 100%

 

Activity4

Actitvity6

Period + 2

Quantity x 100%

In this case the Activity6 takes the Period and the Quantity from the record above

Actitvity6

Actitvity7

Period + 3

Quantity x 80%

In this case the Activity7 takes the Period and the Quantity from the record above

 

I have to generate another table to report the Period and the Quantity Related

TABLE OUTPUT

Activity Related

Period Related

Quantity Related

Activity4

2

135

Activity5

8

70

Activity6

4

135

Activity7

7

108

Thank you very much for your support

 
Posted : 19/10/2019 4:48 am
(@mynda)
Posts: 4761
Member Admin
 

Hi Andrea,

Welcome to our forum! 

It's not logical to sometimes refer to the row above and sometimes not. Rules need to be consistent. In the attached file you'll see I simply changed the rules for activity 6 and 7 so that they reference activity 1, rather than going via rules 4 and 6.

I hope that points you in the right direction.

Mynda

 
Posted : 19/10/2019 7:43 pm
(@a-alfano)
Posts: 5
Active Member
Topic starter
 

Thank you very much Mynda, your forum is really helpful.

Please excuse me if I bother you, but I have to say that I can't understand why the rules are not consistent

Probably I was not clear in my previous statement.

I have a simple table like that.

Activity

Period (Month)

Quantity

A

7

11

X

8

27

 

I have another table like that

Activity

Activity Related

Period Related (Rule)

Quantity Relate (Rule)

A

B

1

90%

B

C

3

100%

C

D

3

100%

X

Y

6

80%

Y

Z

8

100%

Z

K

9

90%

 

Via a mathematical relation like that (Example):

Period --> D (for example) = (A) 7 + (B) 1 + (C) 3 + (D) 3 = 14

Quantity --> Z (for example) = (X) 8 * (Y) 80% * (Z) 100% = 21,6

So there is a mathematical rule for each step with which I’d l like to build a table like:

Activity Related

Period Related (Rule)

Quantity Relate (Rule)

B

8

          9,90

C

11

          9,90

D

14

          9,90

Y

11

        21,60

Z

17

        21,60

K

25

        19,44

Thank you very very much for all your help (and sorry for my poor english).

 
Posted : 20/10/2019 5:01 am
Share: