
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FirstSortedValue in Script
Hi Folks,
i got a Situation , my table does look like:
Project, ProjectName, DateFrom, DateTo
A, A1, 1950-01-01, 2099-12-31
A, A2, 1997-01-01, 2099-12-31
A, A11, 1997-01-01, 2099-12-31
A, A22, 1950-01-01, 2099-12-31
from this table I need only:
Project, ProjectName, DateFrom, DateTo
A, A1, 1950-01-01, 2099-12-31
A, A22, 1950-01-01, 2099-12-31
i tried to resolve this issue with the help of function: FirstSortedValue () based on the field: DateFrom, but it didnt work.
Does anybody have any idea, how to resolve this issue?
Thanks a lot in Advance for your help and time.
Beck
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@beck_bakytbek you can try this
Table:
LOAD * INLINE [
Project, ProjectName, DateFrom, DateTo
A, A1, 1950-01-01, 2099-12-31
A, A2, 1997-01-01, 2099-12-31
A, A11, 1997-01-01, 2099-12-31
A, A22, 1950-01-01, 2099-12-31
];
Right Join (Table)
LOAD Project,
Min(DateFrom) as DateFrom
Resident Table
Group By Project;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@beck_bakytbek you can try this
Table:
LOAD * INLINE [
Project, ProjectName, DateFrom, DateTo
A, A1, 1950-01-01, 2099-12-31
A, A2, 1997-01-01, 2099-12-31
A, A11, 1997-01-01, 2099-12-31
A, A22, 1950-01-01, 2099-12-31
];
Right Join (Table)
LOAD Project,
Min(DateFrom) as DateFrom
Resident Table
Group By Project;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@beck_bakytbek can you elaborate the logic ? how you get the output from your sample ?
Taoufiq ZARRA
"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "
(you can mark up to 3 "solutions") 😉

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunny thanks a lot for your help and time,
is that possible to resolve this issue with the help of function: FirstSortedValue ()?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Taoufiq_Zarra, thanks a lot your Reply, my logic is: i want to select the value on the base of field: DateFrom = DateFrom (1950-01-01 = the first value).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@beck_bakytbek I don't think so because you have two ProjectNames on 1950-01-01... FirstSortedValue will give only one. Why do you want to do this using FirstSortedValue?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sunny, thanks a lot for your fast Reply, i thought, by using this function (FirstSortedValue) i can sort my values starting from 1950-01-01. So i can Show only the first value or am i missing something?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sunny you are absolutely Right, i missunderstand the use of function: FirstSortedValue (). Thanks a lot for your time and help.
