In this example, for each transaction_date in the table, a Returnable_Until value is created. The Returnable_Until value is calculated by shifting the month of the transaction_date to one month later.
In the Data load editor, create a new section, and then add the example script and run it. Then add, at least, the fields listed in the results column to a sheet in your app to see the result.
Load script
SET DateFormat='YYYYMMDD';
SET TimestampFormat='YYYYMMDD h:mm:ss[.fff] TT';
SET FirstMonthOfYear=1;
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';
Transactions:
Load
*,
MonthName(Date#(transaction_date,'YYYYMMDD'), 1) as Returnable_Until,
;
Load * Inline [
transaction_id, transaction_date, transaction_amount, transaction_quantity, discount, customer_id, size, color_code
3750, 20180830, 12423.56, 23, 0,2038593, L, Red
3751, 20180907, 5356.31, 6, 0.1, 203521, m, orange
3752, 20180916, 15.75, 1, 0.22, 5646471, S, blue
3753, 20180922, 1251, 7, 0, 3036491, l, Black
3754, 20180922, 21484.21, 1356, 75, 049681, xs, Red
3756, 20180922, -59.18, 2, 0.333333333333333, 2038593, M, Blue
3757, 20180923, 3177.4, 21, .14, 203521, XL, Black
];
Results
Qlik Sense table showing results of the monthname function being used in the load script.
| transaction_id |
transaction_date |
Returnable_Until |
| 3750 |
20180830 |
Sep 2018 |
| 3751 |
20180907 |
Oct 2018 |
| 3752 |
20180916 |
Oct 2018 |
| 3753 |
20180922 |
Oct 2018 |
| 3754 |
20180922 |
Oct 2018 |
| 3756 |
20180922 |
Oct 2018 |
| 3757 |
20180923 |
Oct 2018 |