Hub
Pricing About
ComponentComponent

First and Last for Group

takbb profile image
Draft Latest edits on 
May 5, 2021 1:48 PM
Drag & drop
Like
Use or download
For a given group column, appends two boolean columns IS_FIRST_IN_GROUP and IS_LAST_IN_GROUP which mark the first and the last row in the current sorted order for the data if grouped by the given column. If grouping by more than one column is required, then you must first create a new column containing the "composite key" of the concatenated other columns and then use this as the grouping column. If you need to find the first or last "significant" row for a given column (e.g. the last non-zero value), then create a composite key column a column expression that only creates group values for the non-zero rows May 5th 2021 @takbb Brian Bates

Component details

Input ports
  1. Type: Table
    Data, already sorted into the required order for processing by group
Output ports
  1. Type: Table
    Evaluated Data
    Data as supplied but with additional boolean columns FIRST_IN_GROUP and LAST_IN_GROUP

Used extensions & nodes

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

    KNIME AG, Zurich, Switzerland

    Version 4.3.2

    knime
  • Go to item
    KNIME Data GenerationTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.3.0

    knime
  • Go to item
    KNIME JavasnippetTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.3.0

    knime
  • Go to item
    KNIME Quick FormsTrusted extension

    KNIME AG, Zurich, Switzerland

    Version 4.3.2

    knime

This component does not have nodes, extensions, nested components and related workflows

Legal

By using or downloading the component, 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