Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm having trouble to build a table as I want.
Here is my problem, I have a table like this one:
Canal | Client | Article | Qté |
20 | 1 | A | 10 |
20 | 1 | B | 20 |
20 | 2 | A | 15 |
And another table like this one:
Article | Prix |
A | 0,1 |
B | 0,2 |
C | 0,3 |
All I want to do is to put in a table the content of the first table and add a column calculated using the second table.
My result table must be like this:
Canal | Client | Article | Qté | Prix * Qté |
20 | 1 | A | 10 | 1 |
20 | 1 | B | 20 | 4 |
20 | 2 | A | 15 | 1,5 |
Can anyone help me to do this? Maybe the mapping could be a solution?
Thanks,
Best regards,
Loïc
try this:
First:
load *
From Table1;
join(First)
load *
From Table2;
noconcatenate
Seccond:
Load *,
Prix * qte as Fieldname
Resident First;
drop table First;
Hi,
1. You will be directly able to build a chart just by loading these tables. Article will get associated. (OR)
2. Use ApplyMap to map Prix to the table. (OR)
3. Use join between these tables.
Thanks,
Prabhu
Hi,
Please find the attached.
Regards
ASHFAQ
try this:
First:
load *
From Table1;
join(First)
load *
From Table2;
noconcatenate
Seccond:
Load *,
Prix * qte as Fieldname
Resident First;
drop table First;
If you directly load these two tables, they would be associated by Article field as Key. Then you can get the same in the front end simply using straight table.
TABLE1:
load * inline [
canal,client,article,Qte
20,1,A,10
20,1,B,20
20,2,A,15
];
TABLE2:
LOAD * INLINE [
article,Prix
A,.1
B,.2
C,.3
];
Create a straight table and insert Canal,Client,Article,Qte as dimension and in expression have the following formula:
(Prix) * (Qte) and select No totals on the bottom.
Table1:
Load
Canal,
Client,
Article,
Qte
from Table1;
Left Join
Load
Article,
Prix
From Table2;
Final:
Load * , Prix* Qte as CalcField Resident Table1;
Resident Table1;
Hope this will help to resolve your problem.
Regards,
Nirav Bhimani
Try as below, and the put all fields in table box:
table1:
LOAD * INLINE [
Canal,Client,Article,Qte
20,1,A,10
20,1,B,20
20,2,A,15
];
table2:
left join (table1)
LOAD * INLINE [
Article,Prix
A,0.1
B,0.2
C,0.3
];
final:
LOAD
Canal,Client,Article,Qte,Prix*Qte as "Prix*Qte"
Resident table1;
drop table table1;
Thanks,
Angad
Hi,
You can do like this
Temp:
Load
Canal,
Client,
Article,
Qte
from TableA;
Left Join
Load
Article,
Prix
From Table B;
Final:
Load * , Prix* Qte as CalcField
Resident Temp;
Drop table Temp;
Hope this will help !!.
Regards,
Deepak
HI ALL
I did as per the attached file kindly suggest if any limitation in doing so
Thanking You
Vinayagam