Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

alexandermllr
New Contributor II

Last year Sales in Script

Hello,

i want something like this:

if(Year = '2017',Price*Percent,Price) as New_Price

If the Year is '2017' it should take the Price from Year = '2016' and so on...

Always the last year Price.

Thank you

2 Replies
srivastava_sarv
Contributor III

Re: Last year Sales in Script

Try this:


For last Year:-=  =Sum({$<Year={$(=Max(Year)-1)}>}Sales)



Regard's

Sarvesh Srivastava

MVP
MVP

Re: Last year Sales in Script

May be look into The As-Of Table

Community Browser