Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
vishsaggi
Champion III
Champion III

Firstsorted value set analysis exclusion of Year selection

Hello All,

Seems like tricky, but trying to figure out how to exclude current selections in a table with Firstsortedvalue expressions.

PFA the sample and inside a text box that explains the problem.

Please let me know if i have not made it clear.

Appreciate your time.

Many thanks,
V.

1 Solution

Accepted Solutions
Nicole-Smith

Change expression for Admit Date to:

FirstSortedValue({<Year=>}Admit_Date, Aggr(only({<Year=>}Date(Charge_Date, 'MM/DD/YYYY ')),Patient_Name, Encounter, Charge_Date))

The "{<Year=>}" tells the expression to ignore any selections in the Year field.  You can add other fields (like month) if you wanted to treat them the same way, i.e. {<Year=, Month=>}

View solution in original post

2 Replies
Nicole-Smith

Change expression for Admit Date to:

FirstSortedValue({<Year=>}Admit_Date, Aggr(only({<Year=>}Date(Charge_Date, 'MM/DD/YYYY ')),Patient_Name, Encounter, Charge_Date))

The "{<Year=>}" tells the expression to ignore any selections in the Year field.  You can add other fields (like month) if you wanted to treat them the same way, i.e. {<Year=, Month=>}

vishsaggi
Champion III
Champion III
Author

Superb,. Thanks very much Nicole for the expression, it worked. Ha i completely forgot about this Only() and trying to complicate the expression. Appreciate your time.