Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
avinashkk696
Contributor III
Contributor III

YOY Not working when single year is selected

Hello all,

I have a requirement in which I have to show a bar chart in which, One bar shows the Current Year value and second bar will show the previous year value. My dimension is Year and expression-1 is Sum(Sales) and expression - 2 is Sum(Sales). Minimum Year is 2013, Max is 2017. When 2014 or any year other than 2013 is selected, chart is not displaying any value for previous year.

When no year is selected:

1.JPG

When a Year is selected,

2.JPG

1 Solution

Accepted Solutions
sunny_talwar

Did you try this?

Above(Sum({<Year>} Sales)) * Avg(1)

View solution in original post

4 Replies
sunny_talwar

What is your expression for Previous Year?

sunny_talwar

Assuming you have something like this

Above(Sum(Sales)), change it to this

Above(Sum({<Year>} Sales)) * Avg(1)

avinashkk696
Contributor III
Contributor III
Author

Hello Sunny,

Sorry for the mistake. My Second expression is Above(Sum(Sales)).

sunny_talwar

Did you try this?

Above(Sum({<Year>} Sales)) * Avg(1)