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

Can't add an integer/double to a vector #755

Open
kiimot opened this issue Feb 17, 2023 · 4 comments
Open

Can't add an integer/double to a vector #755

kiimot opened this issue Feb 17, 2023 · 4 comments
Assignees
Labels
🐛 bug unexpected or wrong behavior

Comments

@kiimot
Copy link

kiimot commented Feb 17, 2023

Good morning! I am trying to create a vector in which to store a value of the last 25 days for each date

When I try to generate the vector, it does it correctly, but when I show the measure in the dashboard I get an error.

Am I doing something wrong? Is it possible to do it in a simpler way?

That is, I have a field that calls DURATION.MEAN for each day. But I want a measure that takes me the average value of the last 25 days of each date, and if that date does not have -25, I leave it blank...

Steps to reproduce

image

The vector creates it correctly, but when I try to display it on the dashboard, I get an error
image

Actual Result

This is the error... Maybe I have to do it in another way.
image

Expected Result

Have a new column called 'AVERAGE DURATION LAST 25 DAYS' in which print the corresponding values
image

Environment

  • atoti: 0.7.2
  • Python: 3.10.10
  • Operating System: Windows 10 Enterprise

Logs (if relevant)

@kiimot kiimot added the 🐛 bug unexpected or wrong behavior label Feb 17, 2023
@tibdex
Copy link
Member

tibdex commented Feb 17, 2023

Hi,

You're speaking of a vector/array but I don't see one in the screenshots you shared. Could you share the code of a minimal reproducible example so that we can help you?

@kiimot
Copy link
Author

kiimot commented Feb 20, 2023

Hi!

The capture of the vector/array is this.
image

What I'm trying to do is... Imagine I have two columns, one with the date and the other with the duration of that date.

Well, the objective is to add a measure so that the value shown on each date is the average duration of the last 25 days.

For example, today February 20, I took an average duration from January 28 (-25 days).

And so with all available dates.

image

@kiimot kiimot removed their assignment Feb 20, 2023
@kiimot
Copy link
Author

kiimot commented Feb 24, 2023

Hi!!

Have you been able to verify the error?

@tibdex
Copy link
Member

tibdex commented Feb 24, 2023

m["DURACION.MEAN"] doesn't seem to be an array so you can't index it (with []). Maybe you need a CumulativeScope with a time period window?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug unexpected or wrong behavior
Projects
None yet
Development

No branches or pull requests

2 participants