Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Graph Dimension Limits

Hi All,

I Have a bar graph with the dimension "Year" and some filters in the Dashboard with the all years available.


I need to limit the years to appears in the graph to three, and If I select only one year in the same way I need show always three year.


Any suggestions to do this?


Thanks in advance.

9 Replies
Anil_Babu_Samineni

What are the three years you need to constant? Which year you are selecting and what are the years you want to do keep. How many years you have in document?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Now in the document I have 4 years, {2014, 2015, 2016 and 2017}. But this dimension will be increased.

I what be always three years in the graph, even when I select a year, i.e. Year = 2014. The result need to be {2014, 2015 and 2016} for Year = 2016 the result {2015, 2016, 2017} or something similar.

sunny_talwar

May be use set analysis to always show three years?

Anil_Babu_Samineni

As i understand, you may need Set analysis

sum({<Date = {">=$(=AddYears(Year, -3))  <=$(=max(Year))"} >} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Some corrections

Three years from selection. If 2014 is selected, this will show 2012, 2013, & 2014 (even if 2016 is the max year available)

Sum({<Year= {">=$(=Max(Year)-3)<=$(=Max(Year))"} >} Sales)

or

Will always show 2014, 2015, 2016 (again assuming max year in the application is 2016)

Sum({<Year= {">=$(=Max({1}Year)-3)<=$(=Max({1}Year))"} >} Sales)

Not applicable
Author

stalwar1, with what kind of expression?

Because in the "Graph Properties " -> "Dimension Limits " I what to "show only" [3 Values] but isn't correct.

I already have some expressions.

Anil_Babu_Samineni

Yes, I am assuming he don't have Forecast year

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

Then how are you using this in your set analysis?

sum({<Date = {">=$(=AddYears(Year, -3))  <=$(=max(Year))"} >} Sales)

Anil_Babu_Samineni

Hahaha, Typo error. I am assuming he has Forecast Year data. But i even doubt about difference

Sum({<Year= {">=$(=Max({1}Year)-3)<=$(=Max({1}Year))"} >} Sales)


OR


Sum({1<Year= {">=$(=Max(Year)-3)<=$(=Max(Year))"} >} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful