Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Simon4
Creator
Creator

Only show one row per item

Dear all,

 

I have this table:

Simon4_0-1667815175801.png

 

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

Labels (1)
2 Replies
BrunPierre
Partner - Master
Partner - Master

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;
vinieme12
Champion III
Champion III

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)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.