I know there are add-ins that do it (Redgate makes one), but is there an easy way to create semi-random data in SQL Server (or Access?) In my case it's bakery stuff (ingredient costs). I have a sort of "index" for wheat, so I can use that for flours (just set the value for the date I have as 100% and scale from there). I can do something like cross joining IngredientID and some time element (week/date, etc). and then I can do something like create a randomish float... that's not too hard. My problem is that I'll create the random numbers and then do a running total over time, and the values just explode. Basically, I create a running total with a windowing function and then add 1 (for the 100%) and multiply that by the original price that I have. Is there a better way to make the data less perfectly linear? Because if I start with a base value (b) and a rate of change (m), that's a flat line. (yeah, y = mx + b )
(I'm trying to simulate price changes over time during covid/war in Ukraine, where some prices increased by about 50% (like flour/wheat) and others by even more. (But flour is the big one). It's all to show the effect of the cost of ingredients (mostly flour, since about 70% of the total ingredient weight is flour in a loaf of bread) over time (well, the shrinking margins etc). I could take (say) white flour, which increases from about $24 per 50lb bag to about $36 or $38...
Or should I just do all of it in Excel? (basically add the starting price, then add a few records then fill down...). It's not going to be perfect, and that's fine. It's a one-off. How would I create an element of randomness to the price changes? (I could do something silly like generating a random int or float and anything that's above or below some threshold gets overwritten as zero (just use IIF() or similar).
I know, sounds like a silly question, but I'm finding that creating realistic fake data is way harder than I thought!
(I'm trying to simulate price changes over time during covid/war in Ukraine, where some prices increased by about 50% (like flour/wheat) and others by even more. (But flour is the big one). It's all to show the effect of the cost of ingredients (mostly flour, since about 70% of the total ingredient weight is flour in a loaf of bread) over time (well, the shrinking margins etc). I could take (say) white flour, which increases from about $24 per 50lb bag to about $36 or $38...
Or should I just do all of it in Excel? (basically add the starting price, then add a few records then fill down...). It's not going to be perfect, and that's fine. It's a one-off. How would I create an element of randomness to the price changes? (I could do something silly like generating a random int or float and anything that's above or below some threshold gets overwritten as zero (just use IIF() or similar).
I know, sounds like a silly question, but I'm finding that creating realistic fake data is way harder than I thought!