Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Calculate Target Rate Based on Previous Year\Record

Hello

I have a table with a Year field and Avg Amount field. I need to create a field that will Calculate A Target Amount based on the previous Year Avg.  For example, my data starts with Year 2012 and My Avg(Amount) is 40, Since there no previous record there is no target rate.  However for the next Year -2013, my Avg(Amount) is 45, my target rate is to be with in 90% of 2012 Amount average, which would be 36 (Or not to diminish more than 10% following year).

The table below hopefully puts thing into perspective.

Yearavg(Amount)Target
201240Null (since its first Year) or could be 40
20134536  (40  * 0.9)
20145040.5  (45 * 0.9)
20154545 (50 * 0.9)
20163740.5  (45 * 0.9)

Please help.

Thank you,

1 Solution

Accepted Solutions
sunny_talwar

May be like this

Above(Avg(Amount)) * 0.90

View solution in original post

2 Replies
sunny_talwar

May be like this

Above(Avg(Amount)) * 0.90

Anonymous
Not applicable
Author

I also found that

above(Column(1))

also works.

Thank you