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: 
AlexO84
Contributor II
Contributor II

Merge rows in a straight table

Hi all,

I have the following table:

AlexO84_0-1651054453259.png

The first 2 rows are taken from the DB (Safety stock in each site), the 3rd row is calculated sum (of the 2 different sites).

I'm trying to group similar P/N's in one row (instead of 3), so it would look like this:

AlexO84_1-1651054682108.png

Any ideas?

 

Thanks, 

Alex.

Labels (2)
2 Replies
vinieme12
Champion III
Champion III

temp:

LOAD * Inline [
Dim1,Dim2,Value,String
B,,,,
B,A,10,
B,A,,wefwef
];
NoConcatenate
Main:
Load
Dim1
,MAXSTRING( Dim2) AS Dim2
,mAX(Value) as Value
,MAXSTRING(String) as String
Resident temp
Group by Dim1;
Drop table temp;

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

Can you please elaborate..?