Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Need to create a column from a sales amount column to show randomly 15 to 25% for a sales column. Anyone has a quick logic
My bad, it should have been this:
((Rand() * (0.25 - 0.15)) + 0.15) * Sales as Rand_Sales
May be like this:
((Rand() * (0.25 - 0.15)) + 0.25) * Sales as Rand_Sales
Maybe this?
Transactions:
Load
Rand1
Where Rand1 >= 0.15 and Rand1 <= 0.25;
Load
Rand() as Rand1
Autogenerate 100000;
this returns more than 25% of the sales amount.
Thanks,
Badr
my table has two columns
Transaction ID and Sales Amount
I need to add additional column for profit and it is random values of 15 to 25 % of sales amount
My bad, it should have been this:
((Rand() * (0.25 - 0.15)) + 0.15) * Sales as Rand_Sales
Transactions:
Load
[Transaction ID]
, Rand1 as [Sales Amount]
Where Rand1 >= 0.15 and Rand1 <= 0.25;
Load
Rand() as Rand1,
recno() as [Transaction ID]
Autogenerate 100000;