cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
JohannesENS
Level III

Weekly Filter

Hello everybody,

 

i do have a column in the following format: dd/mm/yyyy hh:mm:ss

 

I want do add a filter which shows only the last seven days.

Is there a possibility to do this? Unfortunately, I have no experience in scripting/JSL.

 

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Weekly Filter

I still have no idea how you want to use this "filter", so I cannot really provide more information.

 

I have attached modified version of JMP's sample data table Big Class with dates.

jthi_0-1653045616912.png

It has date column (generated with formula) and column which should tell if date is in last 7 days (also formula)

jthi_1-1653045646259.png

There is also table script which will create graph builder to with local data filter

jthi_2-1653045681640.png

 

-Jarmo

View solution in original post

6 REPLIES 6
jthi
Super User

Re: Weekly Filter

Filter with week number (and year) or last seven days? And if last seven days which date should it be based on?

-Jarmo
JohannesENS
Level III

Re: Weekly Filter

Filter last seven days based on current day.

jthi
Super User

Re: Weekly Filter

Not sure where the filter will be, but you can get the date for example with something like this:

Names Default To Here(1);

new_date = Today() - In Days(7);
new_date = new_date - Time Of Day(new_date);
As Date(new_date); //13May2022
-Jarmo
JohannesENS
Level III

Re: Weekly Filter

Thank you. But where to paste this?

jthi
Super User

Re: Weekly Filter

I still have no idea how you want to use this "filter", so I cannot really provide more information.

 

I have attached modified version of JMP's sample data table Big Class with dates.

jthi_0-1653045616912.png

It has date column (generated with formula) and column which should tell if date is in last 7 days (also formula)

jthi_1-1653045646259.png

There is also table script which will create graph builder to with local data filter

jthi_2-1653045681640.png

 

-Jarmo
JohannesENS
Level III

Re: Weekly Filter

Thank you!