Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone. I have a round trip table, in which there is three colume"from" "to" "packets". I need to know between two punkt how many packets would be delivered. Sometime this is only one way between two cities.
this is the table,
from | to | packets |
---|---|---|
A | B | 100 |
A | C | 110 |
A | D | 60 |
B | A | 130 |
B | D | 120 |
C | A | 140 |
this is the results that I want to have,
Between | Packets |
---|---|
A - B | 230 = (100+130 ) |
A - C | 250= (110 +140) |
A - D | 60 |
B - D | 120 |
What is Dimension? How to write expression?
Thank you very much.
Try creating a new table in the script:
Input:
CrossTable(Destination,Value,2)
LOAD RowNo() as Row, packets, from, to INLINE [
from, to, packets
A, B, 100
A, C, 110
A, D, 60
B, A, 130
B, D, 120
C, A, 140
];
Result:
LOAD Row, packets, concat(Value, ' - ') as List
Resident Input
Group By Row, packets;
Then use List as dimension and sum(packets) as expression.