Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Finding the Max Value in Text Object

Hi,

I have a specific query where I need to find the information from my field updatetxt depending on the value of another field udindex.  I created a text object and on my expression wrote the following:

if(max(udindex),updatetxt)

However the text field is blank.  I suspect this is because my udindex can be anywhere from 1 to 113 and therefore when I click on the specific record that has a primary key of callref, it cannot see which text field I need.

Is there a way that I can add in my expression to get the data from updatetxt depending on the MAX value?

Regards,

Jon Ditchfield

1 Solution

Accepted Solutions
Not applicable
Author

You can use firstsortedvalue() as long as udindex is a number and there is only one Updatetxt field for the max(udindex) value.

= Firstsortedvalue(Distinct Updatetxt, - udindex)

Thanks

View solution in original post

4 Replies
Not applicable
Author

try:

=concat({<udindex = {$(max(udindex))}>}updatetxt)

Not applicable
Author

what kind of values are these fields holding?  strings? numeric answers?

Not applicable
Author

You can use firstsortedvalue() as long as udindex is a number and there is only one Updatetxt field for the max(udindex) value.

= Firstsortedvalue(Distinct Updatetxt, - udindex)

Thanks

Not applicable
Author

Hi Robert,

The callref is the specific value we want to report and on the callref column there is a unique value called udindex.  The first udindex is value is always 0 and is populated when a call is logged with the issue on it.  The last value can be anything from 1-150.  updatetxt is the column specific to the udindex, so it looks like the following:

Callref       udindex      updatetxt

221221      0               call logged for installation of office

221221      1               call closed - Office 2010 Installed

Data Types:

callref = numeric

udindex = numeric

updatetxt  = int

Regards,

Jon Ditchfield