Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rounding feature for SUM additive measure #9065

Open
hamsof opened this issue Dec 24, 2024 · 0 comments
Open

Rounding feature for SUM additive measure #9065

hamsof opened this issue Dec 24, 2024 · 0 comments

Comments

@hamsof
Copy link

hamsof commented Dec 24, 2024

In cube.js there is not a feature when you want to apply rounding after the additive measured value.

 some_measure_1: {
      sql: `
        ${CUBE}.col1 - ${CUBE}.col2
      `,
      type: `sum`,
}

we have to introduce another measure for its rounded value

 some_measure_2: {
      sql: `
       ROUND(${CUBE.some_measure_1}, 2)
      `,
      type: `number`,
}

There should be some in additive measure object that should should accept rounding integer if required.
like

 some_measure_1: {
      sql: `
        ${CUBE}.col1 - ${CUBE}.col2
      `,
      type: `sum`,
     round: 2
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant