Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Top last

I have a table which has release name and amount

Like below

ReleaseName Amount

S12.1        27

S12.2        40

S12.3        20

S12.4        22

and so on

in a text box i need to show the last release amount

how can i achive that .....

for example considering above table in a text object i need to show

22 which is for last release S12.4

Thans in Advance

7 Replies
tresesco
MVP
MVP

Try:

=FirstSortedValue(Amount, -KeepChar(ReleaseName,'0123456789'))

smilingjohn
Specialist
Specialist
Author

Hi Tresesco,

Thanks for the reply , But this is not working . this shows a dash in text object .

prashantsanchet
Creator
Creator

Hi

Please try to use below expression

FirstSortedValue(distinct Amount, -KeepChar(ReleaseName,'0123456789'))

This expression gives expected output.Please find attached screenshot

Last Releae.PNG

Regards,

Prashant

tresesco
MVP
MVP

It's working with me.

Capture.JPG

smilingjohn
Specialist
Specialist
Author

Thanks For the reply prashanth ..

For real scenario i have the data as shown in the screenshot ..

For this when the release R-18.7 is the latest one (last value) and when summed the hours should be 491 for R-18.7

with your suggested expression i am getting only 70

Capture444.PNG

Thanks

prashantsanchet
Creator
Creator

Hi,

In this case use below expression:

FirstSortedValue(distinct aggr(sum(Amount),ReleaseName), -KeepChar(ReleaseName,'0123456789'))


Regards,

Prashant

prashantsanchet
Creator
Creator

Hi ,

If this is correct solution ,please mark as correct answer.

Regards,

Prashant