Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
balasundaram
Creator II
Creator II

how to show current along with previous year data if i selected in year list box?

=Sum({<Year = {'$(=Max(Year))'}>} Sales)

i need show while open current year data only


its working separate selections only like


while opening its showing current year data,in list box if i selected previous year its showing previous data..but issue is if i selected both previous and current year in list box..its showing only current year...not showing total two year data..

10 Replies
miikkaqlick
Partner - Creator II
Partner - Creator II

Hi!

Your set expression says that always show greatest selected year. If you select years 2009 and 2012 it will show 2012.

I suggest using trigger OnOpening and removing that set expression.

Br,

Miikka

Climber Finland

rubenmarin

Hi balasun

If you want the sum of selected years you don't need set analysis, only =Sum(Sales)

balasundaram
Creator II
Creator II
Author

only =Sum(Sales)      its not  working

rubenmarin

not the 'only', just:

=Sum(Sales)


Miikka answer was more accurate, if you want only one year on opening, set a trigger.

balasundaram
Creator II
Creator II
Author

u couldn't get my issue

rubenmarin

sure I didn't, can you explain what's not working?

balasundaram
Creator II
Creator II
Author

my issue is i have designed one bar chart...in my list box ,i have 2014-2015 and 2013-14

when i opened my application , bar chart need to show only 2014-2015 data

if i selected 2013-2014 , bar chart need to show 2013-2014 data..

Count({<FYBD = {"$(=Max(FYBD))"} >}Points)

above expression working for that cases..but if i selected 2013-2014 and 2014-2015...its showing 2014-2015 data only...not showing total year data

rubenmarin

Ok, if I understand it well, you can try something like:

If(GetSelectedCount(FYBD)=0, Count({<FYBD = {"$(=Max(FYBD))"} >}Points), Count(Points))

Hope this helps.

balasundaram
Creator II
Creator II
Author

not working