Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am new to Qlikview. Need help.
I have two fields Year and Sales
I need expression to display sum of sales amount of years less than selected year.
Hi,
Try this expression:
=Sum({$<Year={'<=$(=Max(Year))'}>}Sales)
Regards
Hi, rajeshri
you can use Set Analysis to solve this.
store your selected year in a variable and then use set analysis
for example
sum( { $ < Year = { "<>$(vYear)" } > } Sales)
where vYear is a variable in which you store selected year
Hope it will help you
Regards
- Anil
try this..
create a variable for the selected year.
selectedyear ==> IF(GetCurrentSelection(Year) = 0, Max(Year), GetCurrentSelection(Year))
Expression ==> IF(Year <= $(selectedyear), SUM(Sales))
hope that helps..
Hello Vincent,
Thanks a lot.
Its working.
Maybe try a set expression with implicite field value definition using e() function:
=Sum({$<Year= e() }>} Sales)
edit: I assumed that you want to exclude the selected year, if you want to just sum up all years prior the selected year, the first answer is correct
you're welcome
Swuehl Sir,
Can you please explain about e() function.
Regards
IndianQvLover
It shows sum of all except selected year.
I used <= instead of <> now its working.
Thanks, you are grate and genious.
Regards
- IndianQvLover