Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Last 3, 9, 15, 150 days

Hi all!

I'm trying to build smart list box.

I have a daily data for about 5 years and I want to build a list box/button for my users when they can select if they want to see

1) All the available data

2) Last 3 days

3) Last 9 days

4) Last 15 days

5) Last 150 days

any suggestions?

1 Solution

Accepted Solutions
MayilVahanan

Hi

Give 5 button to select the user. 

Based on that, display the chart using set analysis.

Ex:

By Selecting button - Last 3 days:

Sum({<DateField = {">=$(= Date(Max(DateField)-3),'DD/MM/YYYY')"}>}Sales)

By Selecting button - Last 9 days:

Sum({<DateField = {">=$(= Date(Max(DateField)-9),'DD/MM/YYYY')"}>}Sales)

You can use dynamically by assigning the values in a variable.instead of using 3 or 9..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

6 Replies
saradhi_it
Creator II
Creator II

i think in the list box  you can options like per year

1) All the available data

2) Last 1 year

3) Last 2 years

4) Last 3 years

5) Last 4 years

Not applicable
Author

can you give an example?

ashfaq_haseeb
Champion III
Champion III

saradhi_it
Creator II
Creator II

i think by creating a input field or creating a multibox...if you developed the script option,,,

MayilVahanan

Hi

Give 5 button to select the user. 

Based on that, display the chart using set analysis.

Ex:

By Selecting button - Last 3 days:

Sum({<DateField = {">=$(= Date(Max(DateField)-3),'DD/MM/YYYY')"}>}Sales)

By Selecting button - Last 9 days:

Sum({<DateField = {">=$(= Date(Max(DateField)-9),'DD/MM/YYYY')"}>}Sales)

You can use dynamically by assigning the values in a variable.instead of using 3 or 9..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

cool it worked! thanks guys!