User Tools

Site Tools


transformations:runningtotal

Running total

This transformation calculates rank, cumulative count, sum or % from total sum for a given column inside groups, or table-wide.

EXAMPLE

Source table: The longest rivers in the world

River Length(km) Continent
Nile 6650 Africa
Amazon 6400 South America
Yangtze 6300 Asia
Mississippi 6275 North America
Yenisei 5539 Asia
Yellow River 5464 Asia
Ob 5410 Asia
Paraná 4880 South America

Objective: Rank rivers on each continent by length.

Transformation parameters:

  • Mode: Rank descending
  • Group by: Continent

Output table:

River Length(km) Continent Rank
Nile 6650 Africa 1
Amazon 6400 South America 1
Yangtze 6300 Asia 1
Mississippi 6275 North America 1
Yenisei 5539 Asia 2
Yellow River 5464 Asia 3
Ob 5410 Asia 4
Paraná 4880 South America 2
transformations/runningtotal.txt · Last modified: 2018/06/07 13:58 by dmitry