Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Max and Lookup in Straight Table

Can someone help me return the correct SG_Status based on the max(SG_ID)?  The answer in the form of a straight table would be as follows, but I don't know how to solve for it. As you can from my file see I only return nulls with the exception of the first row

Report_ID
max(SG_ID)SG_Status
100011
100122
100233
10044

2

Thanks

1 Solution

Accepted Solutions
danielrozental
Master II
Master II

Try firstsortedvalue(SG_Status, -SD_ID)

View solution in original post

2 Replies
danielrozental
Master II
Master II

Try firstsortedvalue(SG_Status, -SD_ID)

Not applicable
Author

Thanks Dan, you were right even though my model above was wrong. I wish I could give you double points for that!