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: 
paulyeo11
Master
Master

How to add new SOURCE with exchange rate = 1 ?

Hi All

How to modfiy the below load script , BY adding SOURCE = COY2 , RATE =1 Regardless any date ?

sales:
LOAD
Date#(date_inv, 'D/M/YYYY') AS date,
Amount,
company,
SOURCE,
ODSE

INLINE [date_inv, Amount,company,ODSE,SOURCE
1/1/2020, 1,JCS,AP,COY1
1/2/2020, 2,JCS,AP,COY1

];

noconcatenate
Sales_:
Load date,
Amount,
company,
SOURCE,
ODSE,
year(date) as [year],
Day(date) as [Day],
num(month(date)) as [month],
Date(Monthstart(date), 'MMM-YYYY') as YearMonth,
Date(Monthstart(date), 'MMM-YYYY') as MonthYear
Resident sales;

Drop table sales;

[RATE]:

LOAD
RATE,
Date#(date, 'D/M/YYYY') AS date,
SOURCE

INLINE [date,RATE,SOURCE

1/1/2020, 1,COY1
1/2/2020, 2,COY1

];

Paul

 

2 Replies
paulyeo11
Master
Master
Author

Hi All

The reason I need to add the SOURCE for RATE is because now my QV is not able to handle monthly exchange rate. Hope some one can advise me on my post above.

Paul

Saravanan_Desingh

Can u try this?

sales:
LOAD
Date#(date_inv, 'D/M/YYYY') AS date,
Amount,
company,
'COY2' As SOURCE,
ODSE,
1 As RATE
;