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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Adding Current year with previous year max month?

Hi All,

I want to add current year 12 month with previous year max month(means 12 th month).

for ex:

i selected financial year 2015(Apr-Mar)

i want to add ---Mar-2014+currnt year all months(from Apr to Mar)

How to pick the previous year value when i selected current year.

Urgent plz help on this.

Thanks,

Ashok.

1 Solution

Accepted Solutions
sudeepkm
Specialist III
Specialist III

I think you can keep the value in a variable like below. and then use the variable in the expression with the rest of the current year values.

sum({<Year={"$(=Max(Year)-1)"},Months={Mar} >} Price)

// I hard coded the month value as Mar was the highest as per your business logic

View solution in original post

2 Replies
tresesco
MVP
MVP

If you are having a year field, you could try like:

=Sum({<Year+={"$(Max(Year)-1)"}>} Sales)

sudeepkm
Specialist III
Specialist III

I think you can keep the value in a variable like below. and then use the variable in the expression with the rest of the current year values.

sum({<Year={"$(=Max(Year)-1)"},Months={Mar} >} Price)

// I hard coded the month value as Mar was the highest as per your business logic