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: 
sk88024
Creator
Creator

Text Object expression

I am new to Qlikview and struggling to get below expressions in Text object.

1. To get the second lowest profit

2. to get the total profits till previous year( where 2019 is the current year)

The data set would be like this:

LOAD * INLINE [
Year, Profit
2012, 1000
2017, 3200
2018, 400
2019, 2000
];

1 Solution

Accepted Solutions
sunny_talwar

I think for 2, it should be

Sum({<Year = {"<=$(=Year(Today())-1)"}>} Profit)

View solution in original post

2 Replies
Anil_Babu_Samineni

Perhaps these

1) Min(Profit,2)
2) Sum({<Year={">=$(=AddYears(Max(Year),-1))<=$(=Max(Year))"}>} Profit)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
sunny_talwar

I think for 2, it should be

Sum({<Year = {"<=$(=Year(Today())-1)"}>} Profit)