Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Need your urgent help !!
We are sales based company keeping all parts in two different quality. i.e. Higher and Lower.
Sales on both quality parts are recorded seperately.
Example ....
I have one table showing all part details...
| Part NO (Higher Quality) | Part NO (Lower Quality) |
| A11HQ | A11LQ |
| A12HQ | A12LQ |
| A12HQ | A13LQ |
Here A11 is the actual part number having two different qualities. i.e. A11HQ and A11LQ and so on.
Below Sales table showing their sales data. This table contains combined data for Higher and Lower Quality parts.
| Part NO | Sales |
| A11HQ | 100 |
| A12HQ | 104 |
| A12HQ | 39 |
| A11LQ | 60 |
| A12LQ | 62 |
| A13LQ | 64 |
Need Final Result like below....
| Part NO (HQ) | Sales | Part NO (LQ) | Sales |
| A11HQ | 100 | A11LQ | 60 |
| A12HQ | 104 | A12LQ | 62 |
| A12HQ | 39 | A13LQ | 64 |
Your AH12HQ part doesn't have one, but two AHxxLQ counterparts. It's impossible to match them without more information to determine which part and sales values are supposed to belong together.
If the second AH12HQ should actually be AH13HQ then you can try this:
SalesMap:
mapping LOAD * INLINE [
Part NO, Sales
A11HQ, 100
A12HQ, 104
A13HQ, 39
A11LQ, 60
A12LQ, 62
A13LQ, 64
];
Result:
LOAD *,
applymap('SalesMap',"Part NO (Higher Quality)") as Sales_HQ,
applymap('SalesMap',"Part NO (Lower Quality)") as Sales_LQ
INLINE [
Part NO (Higher Quality), Part NO (Lower Quality)
A11HQ, A11LQ
A12HQ, A12LQ
A13HQ, A13LQ
];
The inline loads are just examples. You can replace them with load statements to retrieve the data from your data sources.
Any reply?
Your AH12HQ part doesn't have one, but two AHxxLQ counterparts. It's impossible to match them without more information to determine which part and sales values are supposed to belong together.
If the second AH12HQ should actually be AH13HQ then you can try this:
SalesMap:
mapping LOAD * INLINE [
Part NO, Sales
A11HQ, 100
A12HQ, 104
A13HQ, 39
A11LQ, 60
A12LQ, 62
A13LQ, 64
];
Result:
LOAD *,
applymap('SalesMap',"Part NO (Higher Quality)") as Sales_HQ,
applymap('SalesMap',"Part NO (Lower Quality)") as Sales_LQ
INLINE [
Part NO (Higher Quality), Part NO (Lower Quality)
A11HQ, A11LQ
A12HQ, A12LQ
A13HQ, A13LQ
];
The inline loads are just examples. You can replace them with load statements to retrieve the data from your data sources.
Dear Gysbert,
You are absolutely right. There was typing mistke for A13HQ...
It's working..