Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
shrayas
Contributor II
Contributor II

How to create a new column called as STOCK and store value “NSE” in it throughout.

I need to create a simple column STOCK and store value “NSE” in it throughout the column using Script Editor.

 

Labels (2)
1 Solution

Accepted Solutions
MayilVahanan

Hi @shrayas 

Try like below

LOAD
SYMBOL,
SERIES,
OPEN,
HIGH,
LOW,
CLOSE,
LAST,
PREVCLOSE,
TOTTRDQTY,
TOTTRDVAL,
TIMESTAMP,
TOTALTRADES,
ISIN,

'NSE' as STOCK
FROM
[C:\Desktop\Qlik View\Assignment 2 - Script\2.B.Stock_Market.xlsx]
(ooxml, embedded labels, table is Case_Study_2b_Stock_Market);

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

4 Replies
MayilVahanan

HI @shrayas 

Try like below

Load *, 'NSE' as STOCK from yoursourcetable;

 

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
shrayas
Contributor II
Contributor II
Author

@MayilVahanan  i tried that but its data set is not loading . Can you please guide me where exactly i need to put it? I am new to this qlikview tool. 

Script :-

 

SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;-$#,##0.00';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET FirstWeekDay=6;
SET BrokenWeeks=1;
SET ReferenceDay=0;
SET FirstMonthOfYear=1;
SET CollationLocale='en-US';
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';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';
SET LongDayNames='Monday;Tuesday;Wednesday;Thursday;Friday;Saturday;Sunday';
LOAD
SYMBOL,
SERIES,
OPEN,
HIGH,
LOW,
CLOSE,
LAST,
PREVCLOSE,
TOTTRDQTY,
TOTTRDVAL,
TIMESTAMP,
TOTALTRADES,
ISIN
FROM
[C:\Desktop\Qlik View\Assignment 2 - Script\2.B.Stock_Market.xlsx]
(ooxml, embedded labels, table is Case_Study_2b_Stock_Market);

 

MayilVahanan

Hi @shrayas 

Try like below

LOAD
SYMBOL,
SERIES,
OPEN,
HIGH,
LOW,
CLOSE,
LAST,
PREVCLOSE,
TOTTRDQTY,
TOTTRDVAL,
TIMESTAMP,
TOTALTRADES,
ISIN,

'NSE' as STOCK
FROM
[C:\Desktop\Qlik View\Assignment 2 - Script\2.B.Stock_Market.xlsx]
(ooxml, embedded labels, table is Case_Study_2b_Stock_Market);

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Gabriel
Partner - Specialist III
Partner - Specialist III

@shrayas 

with your code as mentioned by @MayilVahanan 

LOAD
SYMBOL,

'NSE'                                        AS STOCK,
SERIES,
OPEN,
HIGH,
LOW,
CLOSE,
LAST,
PREVCLOSE,
TOTTRDQTY,
TOTTRDVAL,
TIMESTAMP,
TOTALTRADES,
ISIN
FROM
[C:\Desktop\Qlik View\Assignment 2 - Script\2.B.Stock_Market.xlsx]
(ooxml, embedded labels, table is Case_Study_2b_Stock_Market);