Add Percent of Total to Parquet Files Online
Add a percentage-of-total column to Parquet files directly in your browser. Show each row's share of the grand total, or the share within each group — no upload required.
How to add Percent of Total to Parquet files
- Drop your file onto the upload area. The first numeric column is pre-selected as the Value column.
- Choose the Value column. Only numeric columns are listed.
- Optionally choose a Group by column. With (none) each row is a share of the grand total. With a group, each row is a share of its group total and the output name switches to pct_of_group.
- Set Decimal places (default 2, up to 10) and edit the Output column name if you want a different name.
- Click Add % Column, check the preview, then download the file with the new column appended.
Your file is processed locally in your browser and is never uploaded. The free limit is 50 MB per file; larger files work if your device has the memory for them.
Worked example
A council finance officer has budget lines for two departments and wants each line as a share of its own department's budget. One line has not been costed yet.
Input (Parquet)
Parquet file (binary, columnar) — shown as a table with its schema
| department | line_item | amount |
|---|---|---|
| Parks | Mowing contracts | 48000 |
| Parks | Playground repairs | 12000 |
| Parks | Tree planting | 20000 |
| Libraries | E-book licences | 30000 |
| Libraries | Late-night opening | NULL |
| Libraries | Children's programmes | 15000 |
Schema: department VARCHAR, line_item VARCHAR, amount BIGINT
Settings
- Value column: amount
- Group by: department
- Decimal places: 2
- Output column name: pct_of_group
Result
| department | line_item | amount | pct_of_group |
|---|---|---|---|
| Parks | Mowing contracts | 48000 | 60 |
| Parks | Playground repairs | 12000 | 15 |
| Parks | Tree planting | 20000 | 25 |
| Libraries | E-book licences | 30000 | 66.67 |
| Libraries | Late-night opening | NULL | NULL |
| Libraries | Children's programmes | 15000 | 33.33 |
Parks totals 80,000, so mowing is 48,000 / 80,000 = 60%. Libraries totals 45,000 because the empty amount is ignored in the sum. That line gets NULL rather than 0, and the other two Libraries lines still add up to 100. Without a Group by column, every line would be divided by the combined 125,000 instead, so mowing would be 38.4.
Working with Parquet files
Integer, float and DECIMAL columns all appear in the Value column list. The division always produces a DOUBLE, so the new percentage column is a floating-point number even when the source is an exact DECIMAL. Rounding is applied at the decimal places you set, but a DOUBLE cannot store every decimal exactly. If you need exact cents, keep the original amount column as the source of truth.
Grouping works on any column type, including dates and booleans, which is handy for "share of each day's total" when the file has a DATE column. Because the total is computed with a window over the whole file, the percentages cover every row, not just one row group. The output is a new Parquet file with the original schema plus one DOUBLE column at the end. If the source file was split into several Parquet parts, combine them with Merge first, or each part will be measured against its own total rather than the full dataset.
Frequently Asked Questions
What type is the percentage column in the Parquet output?
DOUBLE. The original columns keep their types, including DECIMAL, and the new column is added at the end.
Can I group by a date column in a Parquet file?
Yes. Any column can be the group, so choosing a DATE column gives each row's share of that day's total.
Do the percentages always add up to exactly 100?
Before rounding, the non-NULL rows in each group add up to 100. After rounding to your chosen decimal places, the total can be off by a small amount, such as 99.99 or 100.01. Increase Decimal places if that matters.
What happens with negative values or a zero total?
Negative values produce negative shares, and other rows can then go above 100. When a group totals exactly zero, every row in it gets NULL instead of an error.
Can I use a text column as the value?
No. Only numeric columns are listed. Convert the column with Cast Columns first if it holds numbers stored as text.
Related Tools
Sort Parquet Files Online
Sort Parquet files by any column, ascending or descending, directly in your browser.
Round Numbers in Parquet Files Online
Round numeric columns in Parquet files to any number of decimal places directly in your browser. Set precision per column with a simple slider — no upload required.
Add Cumulative Sum to Parquet Files Online
Add a running total column to Parquet files for any numeric column. Optionally order by a date or sequence column and restart totals per group — no upload required.
Add Percent of Total to CSV Files Online
Add a percentage-of-total column to CSV files directly in your browser. Show each row's share of the grand total, or the share within each group — no upload required.
Add Percent of Total to Excel Files Online
Add a percentage-of-total column to Excel files directly in your browser. Show each row's share of the grand total, or the share within each group — no upload required.
Add Percent of Total to JSON Files Online
Add a percentage-of-total column to JSON files directly in your browser. Show each row's share of the grand total, or the share within each group — no upload required.
Parquet Viewer Online
View and inspect Parquet files directly in your browser. Browse rows, check column names and data types — no upload required, your data stays on your device.
Convert Parquet to CSV Online
Convert Parquet files to CSV format directly in your browser. No upload required — your data never leaves your device.