chartHello everyone,
In my database, new data is added every week from different calculations.
So I have columns per week (Ex: Y2023-W45...) and these columns fill up as the weeks go by.
I represent this data in a graph like below:

I am looking to improve my graph in this way: only represent the weeks for which I have the data (as of today Y2023-W44 and Y2023-W45).
Example below:

I would like my graph to only display these weeks and for my graph to automatically shift to the right from week to week...
The goal is to automate this using a JSL script or using manipulation.
Thank you for your answers !
Data Exploration and VisualizationRe: graphiqueI suggest you use a local data filter, setting the filter to only the time you want to display. The below example set the filter to the last 90 days
Local Data Filter(
Mode( Show( 0 ) ),
Add Filter( columns( :Date ), Where( :Date >= today()-in days(90) ) )
)
Re: chartThank you for your reply !
The data table does not allow me to build a filter like this, I do not have just one date column, I have for example 50 different columns, each corresponds to a week of the year.
Is it possible to automate an offset on the x-axis (for example every week more, shift the x-axis by +1.5) or something like that?
Re: graphiqueIt sounds like you should stack the columns. That would allow you to use the Data Filter.
Re: chartYes it works correctly.
I get a column like this:

Is it possible to select all weeks < today's week.
For example we have:
a= Char( "Y" ) || Char(Year(today())) || "-" || Char( "W" ) || Char(Week Of Year( Today(),3)-1);<BR />// a = "Y2023-W46"
When I run the script, the filter selection would be from week 44 to week 46 because it is week 47 today
Re: graphiqueI suggest that you create 2 new numeric columns, Work Week and Year.
The formula for Work Week would be
num( word( -1, ::Etiquette, "W" ) );
The formula for Year would be
num( word( 1, :Etiquette, "Y-" ) );
Then you can easily select
:Year == Year( Today() ) & :Work Week < Week Of Year( today() );
Being able to use numeric comparisons should prove to be faster, and les complex