Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
My question might be really trivial, but still I need to ask 🙂
Let's consider following table:
ACTIVITY ID, ACTIVITY NAME, MODEL
ACT_1, Activity One, Model_1
ACT_2, Activity Two, Model_2
ACT_3, Activity Three, Model_3
What function I should use to find the last value of MODEL sorting by the ACTIVITY ID.
I'm looking for the chart function.
Thank you very much for your help.
Best regards,
JTPro
Hi,
Look in the help file for the function firstsortedvalue
Stephen
Hi,
Thank you very much for response.
I have already looked in the description of the firstsortedvalue function, but there is restriction that sort-weight must return numeric value. In my case it is a string sort-weight.
Can you write the expression that would do what I want?
Looking forward to hear from you.
Kind regards,
JTPro
Hi,
I would probably load in a sort value via the script.
Data1:
Load * INLINE [
ACTIVITY ID, ACTIVITY NAME, MODEL
ACT_4, Activity Four, Model_4
ACT_3, Act 3.2, Model_3
ACT_1, Activity One, Model_1
ACT_2, Activity Two, Model_2
ACT_3, Activity Three, Model_3
];
Left Join (Data1)
Load
RowNo() As Sort,
[ACTIVITY ID],
Count([ACTIVITY ID]) AS NeededAggregation
Resident Data1
Group by [ACTIVITY ID]
Order By [ACTIVITY ID];
Regards,
Stephen
Hi,
Thank you very much.
It works just perfect.
Kind regards,
JTPro