Please help me. i have cube that input in KG and i want to convert Price and Qty to another unit measures exp.DOOS
Price consolidate is not using aggregate or average but using Sales C: \ Qty C:
Code: Select all
SKIPCHECK;
#Sales = Price * Qty
['KG','Sales'] = N: ['KG','Price']*['KG','Qty'];
#Calculate Consolidate Price per Product
['KG','Price'] = C: ['KG','Sales']\['KG','Qty'];
['KG','Price'] = N: STET;
['KG','Sales'] = N: STET;
['KG','Qty'] = N: STET;
['Qty'] = N: ['KG','Qty'] \ DB('Convert',!Product,!Unit Measures);
['Price'] =N: ['KG','Price'] * DB('Convert',!Product,!Unit Measures);
['Sales'] =N: ['Price'] * ['Qty'];
['Price'] = C: ['Sales'] \ ['Qty'] ;
FEEDERS;
['KG','Price'] => ['KG','Sales'],['Price'];
['KG','Sales'] => ['KG','Price'];
['KG','Qty'] => ['Qty'];
['Price'] => ['Sales'];
['Sales'] => ['Price'];