Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
124psu
Creator II
Creator II

set analysis to show previous years upon filter pane selection

I have a filter pane with fiscal years. All of my charts are based on trend analysis type charts going by fiscal year. I'd for users to select a value from the filter pane and see all the previous years analysis. 

E.g. if a user selects 2019. They will see the inception of data up until 2019. So lets say the data is 2010-2019. If a user selects 2012, they will see 2010, 2011, 2012. Right now, if a user were to select a value, it will only show that year. How do I set it so it will show all the previous year?

Labels (2)
8 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Use this filter in your Set Analysis conditions:

Year = {"<=$(=max(Year))"}

This would work if Year is a "regular" numeric field that you calculate manually in your data load script. If you use Derived Fields for your Calendar, then the field format is dual, and this condition may require some tweaking.

Cheers,

Oleg Troyansky

Check out my book QlikView Your Business - an Expert Guide to QlikView and Qlik Sense.

 

manoranjan_d
Specialist
Specialist

Year ={">=$(=YearStart(Min(Year )))<=$(=Max(Year ))"}>}

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I'm not 100% sure that this formula would work... YearStart() returns a formatted Date that corresponds to the beginning of the year, for example 1/1/2019. I don't think you can compare the Year field to it...

124psu
Creator II
Creator II
Author

Thanks for your help. Our column is being treated as a numeric and all should be fine there. When I try to use this within my dimension formula I'm having some trouble. I'm assuming you need to set this in both the charts and filter panes? Thanks again.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

This filter goes into  the Measure  not Dimension and not the Filter Pane.

124psu
Creator II
Creator II
Author

Here is my syntax. It goes through but the revenue amounts do now show across the years.

Sum({< FISCAL_YR = {"<=$(=max(FISCAL_YR))"}>} TOTAL_REV))

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

The syntax looks right.

Please clarify the problem. Preferably attach a small sample App that demonstrates what is not working, or at least show a screen shot with the description of the problem.

124psu
Creator II
Creator II
Author

Here is a quick sample. You can see I have the YEAR as the X-axis and AMOUNT as Y-axis. When a user selects 2019, I'm hoping the chart will update so that it will show all the years up to 2019. I'm not too sure on how or where to set this range, but I feel like I need to intertwine the use of a variable (start year) and getselectedfield value or some sort. Let me know if you have trouble opening the qvf. Thanks again.