Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
Not applicable

Re: How to limited the number of field on the slider

=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
Highlighted
MVP & Luminary
MVP & Luminary

Re: How to limited the number of field on the slider

Hi,

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

Regards,

Kaushik Solanki

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
Highlighted

Re: How to limited the number of field on the slider

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

Highlighted
Not applicable

Re: How to limited the number of field on the slider

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.

Highlighted
MVP & Luminary
MVP & Luminary

Re: How to limited the number of field on the slider

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

Regards,
Kaushik
If reply is satisfactory, please "Like" the post.
If reply is solution, please mark as "Correct".
Highlighted

Re: How to limited the number of field on the slider

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

Highlighted
Not applicable

Re: How to limited the number of field on the slider

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.

Highlighted
Not applicable

Re: How to limited the number of field on the slider

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

Highlighted
Not applicable

Re: How to limited the number of field on the slider

=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