Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
manozpph
Creator
Creator

How to Create A Dynamic Straight Table for Current and past 2 years..?

I Want to Create a straight table with any dimension/s and with an expression for LineSalesAmount for each of the three years (selected year and its previous two years). If no selection has been made by the user for the year, the straight table should display the LineSaleAmount for the most recent year and its previous two years.

If anyone able to make it Please solve it.

Thanks in Advance!!

1 Solution

Accepted Solutions
manozpph
Creator
Creator
Author

I got the Result .

Thank you

View solution in original post

2 Replies
deepakqlikview_123
Specialist
Specialist

You need to use set analyis.

Try below expressions

Current year--> sum({$<Year={$(=Max(Year))}>}LineSalesAmount)

Previous year-->sum({$<Year={$(=Max(Year)-1)}>}LineSalesAmount)

Previous to previous year-->sum({$<Year={$(=Max(Year)-2)}>}LineSalesAmount)

Thanks,

Deepak

manozpph
Creator
Creator
Author

I got the Result .

Thank you