I've been working hard to understand Qlik, but the documentation is sparse and there simply aren't a ton of scripting examples out there to help me pick it up any faster. I'm very frustrated, so my apologies if I'm not explaining this well.
My data is small, only about 3500 records and 100 columns. It is a single table which I've connected to via an ODBC connection. I need to create a new derived column that will hold values that come from a calculation. I need to accomplish this in the Data Load Editor.
The calculation has been given to me and needs to be translated from this pseudocode into working code:
(sum(Col_A) / total_num__of_records) * value_in_Col_B
- Col_A is a dummy column with values of 1 or 0.
- total_num_of_records needs to be a count of the total number of rows in the table.
- Col_B is an existing column in the database that holds numerical values (floats).
In the data load editor, I need to write something like this, but cannot understand why it won't work. The error message literally shows a question mark and no explanation:
LOAD * ,
((SUM(Col_A) / COUNT(Record_ID)) * Col_B) AS New_Column;
That's all I want to do, but it won't work, and despite a ton of googling, I cannot figure out how to perform such a simple calculation in the Data Load Editor. Please help! Thank you!