Yann DIAB Posted May 31, 2022 Share Posted May 31, 2022 Hi experts, I have a table that looks a bit like this : But I need to create other lines for visualizations and calculation purposes. I need to create a new row for each 8 hours there is between the start and end datetime, pretty much like this : Thing is, I'm new to spotfire, and I have never used python... Does anyone know how I can add these rows Link to comment Share on other sites More sharing options...
Fabian Duerr Posted May 31, 2022 Share Posted May 31, 2022 Does every row need its own 8 hour binning If yes, should the start time of the row be the origin or what other time If no, what would we to origin (date and time) for the binning Are your time stamps always this exact or can you have something like 31/05/2022 06:53 How big is the time range of your table Don't simplify your example too much, otherwise you might get a solution that will not scale ;) Depending on your answers there might be a chance to solve this with a separate table + join or with a data function. Link to comment Share on other sites More sharing options...
Yann DIAB Posted June 1, 2022 Author Share Posted June 1, 2022 Dear fabd, Thank you for your answer, you are right, I wasn't very precise. -> Does every row need its own 8 hour binning I really think there is no easier solution ->If yes, should the start time of the row be the origin or what other time Yes, start time is the origin, and end time, the last row's date -> If no, what would we to origin (date and time) for the binning X ->Are your time stamps always this exact or can you have something like 31/05/2022 06:53 Yes, always 6:00, 14:00, 22:00 -> How big is the time range of your table Can't tell, as of now from 8 hours up to many weeks/months. In fact, there is no limit (data comes from an extract of a website that doesn't put limits for the maximum timespan) If you want, I can post my Spotfire file, but unfortunately I can't post my datasource Link to comment Share on other sites More sharing options...
Yann DIAB Posted June 1, 2022 Author Share Posted June 1, 2022 Dear fabd, Thank you for your answer, you are right, I wasn't very precise. -> Does every row need its own 8 hour binning I really think there is no easier solution ->If yes, should the start time of the row be the origin or what other time Yes, start time is the origin, and end time, the last row's date -> If no, what would we to origin (date and time) for the binning X ->Are your time stamps always this exact or can you have something like 31/05/2022 06:53 Yes, always 6:00, 14:00, 22:00 -> How big is the time range of your table Can't tell, as of now from 8 hours up to many weeks/months. In fact, there is no limit (data comes from an extract of a website that doesn't put limits for the maximum timespan) If you want, I can post my Spotfire file, but unfortunately I can't post my datasource Link to comment Share on other sites More sharing options...
Fabian Duerr Posted June 11, 2022 Share Posted June 11, 2022 Hi Yann, please embedd the data next time instead of attaching all supporting files. And try to keep the files as simple as possible. (Remove columns that are not needed to understand the problem) Attached is the solution. You can change what columns should be used be used for the final table in the "edit parameter" menu. Browse the Wiki in the tibco community and YouTube to learn more about how data functions work. new_table Link to comment Share on other sites More sharing options...
Fabian Duerr Posted June 11, 2022 Share Posted June 11, 2022 Hi Yann, please embedd the data next time instead of attaching all supporting files. And try to keep the files as simple as possible. (Remove columns that are not needed to understand the problem) Attached is the solution. You can change what columns should be used be used for the final table in the "edit parameter" menu. Browse the Wiki in the tibco community and YouTube to learn more about how data functions work. new_table Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now