Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to limited the number of field on the slider

I need to limited the slider to show just the last 12 months in the base. How can I do that?

Thanks in advance

1 Solution

Accepted Solutions
Not applicable
Author

=if(Aggr(rank(AddMonths((max({1<Date>}Date)),-12)),Date)<=12, MonthName(Date)). This worked for me I am anwesring here to help others, because It was very dificult to find and I didn't know the function rank.

View solution in original post

8 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Can you please explain with example what you are looking for.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
avinashelite

In the properties you have the option to define the number of segments rite ??

Not applicable
Author

I will try explain better.

I am using a slider to show the month name of date

But I need to show just the last 12 months for exemple I want to show from march 2015 to february 2016 even if in the base have more then 12 months. In the graphic would be simple I would order by the date and choose in the dimension limits the first 12. But I don't know how to do that in the slider.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

You will have to use the variable in slider, to limit your months.

When you use variable in slider, it will enable Min Value and Max Value for you which you can manipulate as per your requirement.

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
avinashelite

you could a if condition for the same

if(date_field > (date_field)-12 and date_field <=monthname(today(0)), date_field )

NOTE: for this formula you date field needs to in the Month Year format , if the format is different change the expression accordingly

Not applicable
Author

I am confuse If I use date_field > (date_field)-12 all dates will be higher then herself - 12 and also dates will be also smaller then todays date since the base just show past months.

Not applicable
Author

I am not sure how to use variable on the slider but I will try

Not applicable
Author

=if(Aggr(rank(AddMonths((max({1<Date>}Date)),-12)),Date)<=12, MonthName(Date)). This worked for me I am anwesring here to help others, because It was very dificult to find and I didn't know the function rank.