Mode Analytics
Sign In
Sign Up

SQL Editor

Query your connected data sources with SQL

Notebooks

Use Python and R for advanced analysis

Reports

Build customizable, sharable reports


Compare plans Dashboards Security Embedded analytics Customers Integrations

Gallery Learn SQL Learn Python

Mode Business Blog Forum

Mode Analytics

Mode Business
Product

SQL Editor

Query your connected data sources with SQL

Notebooks

Use Python and R for advanced analysis

Reports

Build customizable, sharable reports

Compare plans Dashboards Embedded analytics Customers Integrations Security
Resources

Gallery

Explore example analysis and visualizations

Learn SQL

Answer data questions with SQL

Learn Python

Learn Python for business analysis

Documentation Getting started webinar Forum Blog Contact us
Sign In Sign Up – Free Forever
Gallery
  • Charts
  • Tables
  • Reports
  • Dashboards
Try Mode Business

Automate everything & equip everyone with Mode Business.

Request a Demo

Totals at the bottom of a table

Sometimes it’s helpful to add a “Totals” row at the bottom of your table.

This example features “Totals” at the bottom of columns of flight revenues by airport.

Mode Analytics

Click Results à la Mode to clone the report and add a “Totals” row to your own table. Learn more about using HTML to customize your reports.

Add totals

Once you’ve added a table to your report, you can integrate a totals row at the bottom with the following steps.

Add the stylesheet link and script tag to the top of the HTML:

<link rel="stylesheet" href="https://mode.github.io/alamode/alamode.min.css">
<script src="https://mode.github.io/alamode/alamode.min.js"></script>

Add the customizable snippet at the bottom of the HTML:

<script> 

alamode.addTotalsRow(
  { 
    query_name: "Revenues by Airport",
    table_id: "table_8bbae0ecf25c",
    columns_with_totals: "all" 
  })

</script>

You can customize the table by editing the parameters in the snippet:

  • table_id: The ID of the Mode table you want to add links to. You’ll find this ID in the pre-populated HTML code in a line that looks like this: <mode-table id="table_8bbae0ecf25c" dataset="dataset" options="table_options"></mode-table>.
  • query_name: The name of the query that returns the table’s dataset. If you update the name of the query, you’ll need to update it here as well.
  • columns_with_totals: An array of the column(s) you want to show totals for. If you want to show totals for all numeric columns, use "all".
Tags: tables

See more examples

  • Heat Map
  • Funnel chart
  • Chart annotations

<< Back to Gallery

Looks like you've got a thing for cutting-edge data news.

So do we. Stay in the know with our regular selection of the best analytics and data science pieces, plus occasional news from Mode. Sign up here and we'll keep you posted:

Thanks! Keep an eye on your inbox for the next newsletter!

Contact

Request a Demo

hi@modeanalytics.com

415-689-7436

208 Utah Street, Suite 400
San Francisco CA 94103

Product

Compare plans

Mode Business

SQL editor

Notebooks

Reports

Dashboards

Embedded analytics

Mode for Slack

Customers

Integrations

Security

Resources

Help & support

Getting started webinar

Forum

Learn SQL

Learn Python

Data jobs

Data news

Drag and drop webinar

Scaling analytics webinar

Retention analytics ebook

Salesforce CRM ebook

Company

About

Careers

Blog

© Mode Analytics, Inc. 2018 Terms of Service Privacy Policy