Skip to content

Expanding a measure inline that has a comment at the end can result in invalid code #1494

Closed

Description

@edhans

Description

I am not sure if this is a bug per se, because I think putting comments at the end of expressions is a bad practice.

If a measure has a comment as the last line, and you expand that measure Inline, if there was a comma after the measure, the comma (or any other code) will get commented out resulting in an invalid expression. See the screenshot.

Tabular Editor 3 Version

3.23.1

Screenshots

The [Margin] measure has a comment at the end of it. Watch what happens when you expand it inline:

Image

Steps to Reproduce

  1. Put a comment at the bottom of a measure
  2. Reference that measure in another measure in a DIVIDE() in the numerator so the comma is affected.
  3. Expand the measure inline

It could also be the denominator. In that case the final parens is commented out. This is just one example.

Expected behavior

What it should do is after the inline expand, everything after it should be moved to another line, not kept on the same line as the last line of code expanded inline.

Crash Report

No response

Windows Version

11

Activity

  1. otykier commented on Sep 24, 2025

    @otykier
    Collaborator

    Thanks for reporting this, Ed. Should be an easy fix :)

  2. added
    issue: bugConfirmed as a bug in TE3
    and removed
    template: issueIssue report created by user, needs to be triaged
    on May 27, 2026
  3. jeroenterheerdt commented on May 27, 2026

    @jeroenterheerdt
    Contributor

    I added this to the backlog as we missed it earlier.

  4. mlonsk commented on Sep 25, 2026

    @mlonsk
    Collaborator

    Hi @edhans
    This issue has been fixed in Tabular Editor 3.27.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: bugConfirmed as a bug in TE3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions