Created
November 17, 2013 14:24
-
-
Save IronistM/7513985 to your computer and use it in GitHub Desktop.
Generate random data for qlikView
[ From http://www.qlikfix.com/wp-content/uploads/Legacy/VariablesLabelReferenceVsExpression/GenerateData.qvs ]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set RecCount = 500000000; // Number of records to generate | |
Data: | |
load | |
chr(round(25 * rand() + 65)) & chr(round(25 * rand() + 65)) & chr(round(25 * rand() + 65)) as Customer, // Customer name between AAA and ZZZ | |
chr(round(25 * rand() + 65)) as Product, // Product name between A and Z | |
round(3 * Rand() + 2008) as Year, // Year between 2008 and 2011 | |
round(1000000 * Rand()) as Actual, // Actual Revenue between 0 and 1,000,000 | |
round(1000000 * Rand()) as Target // Target Revenue between 0 and 1,000,000 | |
autogenerate(RecCount); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment