Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld Online 2021, May 10-12: Our Free, Virtual, Global Event REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Remco
Contributor III
Contributor III

Question about finding the value previous to MAX

Good morning all,

I am still learning Qlik and I am running in all kinds of issues. Many of them I solve via this community, others not. Like the next issue:

I am able to find the sum of the value belonging to the max PF_PORTFOLIOPERIOD in the next expression

=Sum({<TYPE = {"FLEETSIZE OL"}, PORTFOLIOPERIOD = {"$(=MAX(PF_PORTFOLIOPERIOD))"}>} ACTUAL)

How can I find the the same belonging to the PF_PORTFOLIOPERIOD just before the max? These periods are always 12 values in the actual example. I cannot just substract a fixed number as these periods are build up as year & month like 201909, 201910, 201911, 201912, 202001 etc. 

 

Thanks!

 

1 Solution

Accepted Solutions
premvihari
Partner
Partner

Hi @Remco ,

I just tried to understand what restricting you for not using  "max(PF_PORTFOLIOPERIOD, 2)". This will give second-highest value 

View solution in original post

2 Replies
premvihari
Partner
Partner

Hi @Remco ,

I just tried to understand what restricting you for not using  "max(PF_PORTFOLIOPERIOD, 2)". This will give second-highest value 

View solution in original post

Remco
Contributor III
Contributor III
Author

I feel stupid... I did not know that, as simple as that. Thanks!