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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Multiple conditions

I am trying to create an expression that checks for year first and then I want it to pull the max year, period record to get the value.

I concatenated the Year & Period at the time of load.  I call that YR_PRD

I also have an input box to allow the user to enter the fiscal year they want to look at.

Here's an example of what my data looks like:

Asset#     Year      Period     Depreciation$

100          2014     1               15.00

100          2015     1               14.00    

100          2014     2               17.00    

100          2015     2               16.00

100          2014     3                16.50

100          2015     3               17.50

So if I input 2014, I want the 2014 period 3 record to pull the $16.50 since that is the max yr_prd in the record.

How can I create the expression to pull this record?????

2 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Something like (not syntax checked)

=FirstSortedValue({<Year={$(vYear)}>} Depreciation$, -Period)

-Rob

http://masterssummit.com

http://robwunderlich.com

Anonymous
Not applicable
Author

Hola,

PFA

HTH