Visidata: [wishlist] use aggregators in column expressions

Created on 11 Nov 2019  路  6Comments  路  Source: saulpw/visidata

Hi,
a classic task working with tables is to write formula that uses the sum of a field, as parameter for another field calculation (Cell Value/SUM(FieldName)*100).

I know that vd is not a spreadsheet (it's better :) ), but I think that this is a really common task and it would be great to be able to write also whole field based expressions.

Thank you

wishlist

Most helpful comment

@aborruso :D

Marie Kondo is a lady from Japan who professionally helps people clean and organise their homes. She wrote some books on her practice. The first step she covers is a decluttering one. XD

Find what sparks joy, @aborruso!!

All 6 comments

This functionality would be very useful, thanks @aborruso

Hi @aborruso!

Just clarifying the ask, you are interested in being able to use calculations run on an entire column in expr-col

E.g. =Total / SUM(Total) would set a cell in row A to the Total value in the row A divided by the SUM() of the entire Total column?

@anjakefala yes, to be able to click = and write something like SUM(FieldA)/FieldB. From

FieldA FieldB
5      0.2
6      0.7
1      0.9
18     0.3
5      0.25

to

FieldA FieldB Result
5      0.2    175
6      0.7    50
1      0.9    38.8888888888889
18     0.3    116.666666666667
5      0.25   140

The first cell of Result is (5+6+1+18+5)/0.2

Thank you

Kondo'ed for now.

Kondo'ed for now.

What's the meaning of Kondo'ed ? (my english is not so good)

@aborruso :D

Marie Kondo is a lady from Japan who professionally helps people clean and organise their homes. She wrote some books on her practice. The first step she covers is a decluttering one. XD

Find what sparks joy, @aborruso!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

geekscrapy picture geekscrapy  路  12Comments

aborruso picture aborruso  路  29Comments

aborruso picture aborruso  路  12Comments

frosencrantz picture frosencrantz  路  11Comments

cclark picture cclark  路  18Comments