Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
i got question, in my issue i have the following values:
Projekt, ID, Name, Datum, Value
PR_1, 1, Test1, 15.06.2017, 20 €
PR_2, 2, Test2, 30.06.2017, 40 €
where Project= PR_2 and ID = 2 are my last Value,
my question is, how can take over on the base of last ID, all value for next ID and with Datum: 30.07.2016,
the problem with next Month,i already solved,
My expected outpu is:
Projekt, ID, Name, Datum, Value
PR_1, 1, Test1, 15.06.2017, 20 €
PR_2, 2, Test2, 30.06.2017, 40 €
PR_2, 2, Test2, 30.07.2017, 0 €
does anybody have any ideas?
Thanks a lot
Beck
May be this
Table:
LOAD * Inline [
Projekt, ID, Name, Datum, Value
PR_1, 1, Test1, 15.06.2017, 20 €
PR_2, 2, Test2, 30.06.2017, 40 €
];
Concatenate(Table)
LOAD MaxString(Projekt) as Projekt,
Max(ID) as ID,
FirstSortedValue(Name, -ID) as Name,
Date(AddMonths(FirstSortedValue(Datum, -ID), 1)) as Datum,
'0 €' as Value
Resident Table;
May be this
Table:
LOAD * Inline [
Projekt, ID, Name, Datum, Value
PR_1, 1, Test1, 15.06.2017, 20 €
PR_2, 2, Test2, 30.06.2017, 40 €
];
Concatenate(Table)
LOAD MaxString(Projekt) as Projekt,
Max(ID) as ID,
FirstSortedValue(Name, -ID) as Name,
Date(AddMonths(FirstSortedValue(Datum, -ID), 1)) as Datum,
'0 €' as Value
Resident Table;
You can try this also its dynamically read your last row and add to the main table.
MainTab:
LOAD *,RowNo() as Rowid;
LOAD * Inline
[
Projekt, ID, Name, Datum, Value
PR_1, 1, Test1, 15.06.2017, 20 €
PR_2, 2, Test2, 30.06.2017, 40 €
];
MaxRow:
LOAD Max(Rowid) as MaxRowId Resident MainTab;
Final:
Concatenate(MainTab)
LOAD
Projekt,
ID,
Name,
Datum,
'0 €' as Value
Resident MainTab
Where Exists (MaxRowId,Rowid);
Hello Sunny,
thanks a lot four your help
Beck
Hello Anand,
thanks a lot for your help
Beck