Hub
Pricing About
WorkflowWorkflow

Sum last 3 non zeros in a row

bruno29a profile image
Draft Latest edits on 
Jun 1, 2022 4:42 AM
Drag & drop
Like
Download workflow
Workflow preview
Here I got 1 table where i got the following 1 5 4 7 8 3 0 7 0 8 0 2 I want to sum only the last 3 values from right to left ignoring the zeros, example it will sum 17. Each of the numbers are in a cell. Examples: 1 3 5 7 8 0 2 7 0 8 0 2 = 17 2 5 0 2 0 0 5 0 0 2 1 4 = 7 0 0 0 2 0 0 0 4 0 0 0 0 = 6 since there is only 2 values 2 0 0 0 0 0 0 0 0 0 0 0 = 2 since there is only 1 value 0 0 0 0 0 0 0 0 0 0 0 0 = 0 since there is no value

External resources

  • forum.knime.com/t/sum-last-3-non-zeros-in-a-row/43658
Loading deploymentsLoading ad hoc jobs

Used extensions & nodes

Created with KNIME Analytics Platform version 4.5.2
  • Go to item
    KNIME Base nodesTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.5.2

    knime
  • Go to item
    KNIME JavasnippetTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.5.0

    knime

Legal

By using or downloading the workflow, you agree to our terms and conditions.

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • Courses + Certification
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more about KNIME Business Hub
© 2025 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Data Processing Agreement
  • Credits