Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlik experts,
I am working on a application, where in I am required to pick 2 latest supplier values from a available list along with only one latest sqe_name.
I am showcasing below sample data using which if some1 could help me achieve this.
in the above screenshot, data is sorted in desc order and the top 2 suppliers and top1 sqe needs to displayed as below-
Another example -
data table sorted by date in desc order
final output should look like this -
Could some1 please help me to achieve this?
I am attaching the sample data for reference.
Try this,
supplier1: FirstSortedValue(supplier_name,-date)
supplier2: FirstSortedValue(supplier_name,-date,2)
sqe: If(IsNull(FirstSortedValue(sqe_name,-date)),FirstSortedValue(sqe_name,-date,2),FirstSortedValue(sqe_name,-date))
Hi Praveen,
Use the expression to get top 1 supplier:- Aggr(Only({<date={"$(=Max(date))"}>}supplier_name),supplier_name)
top 2 supplier:- Aggr(Only({<date={"$(=Date(Max(date,2)))"}>}supplier_name),supplier_name)
Please find the attached working file.
Try this,
supplier1: FirstSortedValue(supplier_name,-date)
supplier2: FirstSortedValue(supplier_name,-date,2)
sqe: If(IsNull(FirstSortedValue(sqe_name,-date)),FirstSortedValue(sqe_name,-date,2),FirstSortedValue(sqe_name,-date))
Output: