Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
I have this table:
I want to create this table:
item | Category | Available stock | date new stock | amount new stock | total in produciton |
E0020021 | Slangen | -72 | 10-11-2022 | 50 | 50 |
e002035 | Pistolen | -6 | 3-9-2022 | 20 | 37 |
e0020060 | compressoren | -32 | 0 | 0 | |
fa0500.0560 | compressoren | -14 | 15-9-2022 | 5 | 5 |
S0000865 | Slangen | -75 | 5-10-2022 | 55 | 55 |
S0000866 | Slangen | -54 | 12-10-2022 | 50 | 50 |
S0000882 | Pistolen | -27 | 7-10-2022 | 20 | 20 |
So in short:
I only want to know the first date of each item and the value of stock that belongs to that day. I also want an collum with the total order value.
This I use for date new stock:
=if(isnull(DATEPRODUCTIONFINISHED),PLANNEDPRODUCTIONENDDATE)
this i use for amount new stock:
sum(if(isnull(DATEPRODUCTIONFINISHED), ORIGINALSUBASSEMBLYQUANTITY))
can some one help me create the table above?
thank you kinldy in advance.
kind regards,
Simon
TempT:
LOAD *,
FROM TableSource;
DataTable:
LOAD Item,
Category,
FirstValue([Date new stock]) as [Date new stock],
FirstValue([Available stock]) as [Available stock],
FirstValue([amount new stock]) as [amount new stock],
Sum([amount new stock]) as [Total in Production]
Resident TempT
Group by Item, Category;
DROP Table TempT;
EXIT SCRIPT;
create chart as below
Dimensions
Item
Category
newstockdate << Un-Check Show Null Values
Measure
sum({<newstockdate ={"=len(newstockdate)>0"}>}newstock)
sum({<newstockdate ={"=len(newstockdate)>0"}>}availablestock)