Skip to main content

Water Cooler

This space is for everyone to ask questions related to the Community Platform. It's a space for us to get to know each other and have some fun! Come in and gather around the Water Cooler!

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
d_petrov
Contributor III
Contributor III

Slider with months and years affected by filtering

Hello

I have a data set, which contains numbers and dates.

To each number there are corresponding dates for every day for a given period, which may be expanded to several years.

In the script I use the DATE#(DATE(MonthStart(Full_Date),'M/D/YYYY'),'M/D/YYYY') AS StartMonth, where Full_Date is a datetime , which represent each day in the given period for the selected number.

In the slider I use StartMonth formatted from Number tab like a Date as MMM-YYYY.

If I select a number from the filter I would like slider to be reloaded with its corresponding period in month and year.
Instead the slider shows all possible values for all number no matter that a single number is selected.
The table below also uses StartMonth without any additional formatting and it is filtered correctly for the selected number and these values I need to see also in the slider.

How  I can do this? 

Please, check the screenshot it displays everything.

Best Regards,
D. Petrov

1 Solution

Accepted Solutions
sunny_talwar

You can change the scale to fix this... but the problem with Custom Scale is that it will stay fixed even if you have not selected a Number...

image.png

View solution in original post

9 Replies
sunny_talwar

What expression have you used for Min Value and Max Value on the General tab of the Slider Object's properties?

d_petrov
Contributor III
Contributor III
Author

Hello,

I tried with StartMonth, which I created in the script and this represents the first day of every month.

After that I tried to put StartMonth as variable and use it with the Variable(s) option instead of the Field.

For min value I put MIN(StartMonth) and MAX(StartMonth) for max value.

sunny_talwar

Is it still not working? Would you be able to share a sample where you have this issue to check this out?

d_petrov
Contributor III
Contributor III
Author

Hello,

Sure, in case I use variables the range is filtered by Number selection, but there are additional values , which appear twice like Jan-2008 or Feb-2008 for selected number 16.

Without formatting the values  2008-01-01 and 2008-01-15 appears , no matter that StartMonth in this case is  only 2008-01-01 and there are no such dates like 2008-01-15

sunny_talwar

I see the issue now and it seems to be weird that we are unable to drill down the field Full_Date when we select Number. I guess this is by design.. but it seems unfortunate that it isn't easy to override it. Will continue to explore some other options and get back to you as soon as possible

sunny_talwar

Try this expression for your slider object

=Aggr(Only({1<Number = P(Number)>}Full_Date), Full_Date)

and make sure to select Value Mode = 'Discrete'

image.png

d_petrov
Contributor III
Contributor III
Author

Thank you!
Yes , the slider is now reloaded by the Number selection. The only thing, which is left is to display on the slider some missing months in the same way like currently displayed ones.

sunny_talwar

You can change the scale to fix this... but the problem with Custom Scale is that it will stay fixed even if you have not selected a Number...

image.png

sunny_talwar

You can change the scale to fix this... but the problem with Custom Scale is that it will stay fixed even if you have not selected a Number...

image.png