Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Update a table in qlikview with values from a spreadsheet

Hi,

I'm trying to work out the best way to update a table in qlikview with values from a spreadsheet.

I have a table called Data:

ID        MonthYear        Value

1          Apr 2012          10

1          May 2012         13

1          Jun 2012           9

2          Apr 2012          12

2          May 2012         18

2          Jun 2012           2

3          Apr 2012          32

3          May 2012         12

3          Jun 2012           1

I also have a spreadsheet called Amendments:

ID          MonthYear          Value

1           May 2012            10

1          Jun 2012               8

2          Apr 2012              20

3          Jun 2012              15

I want to import the spreadsheet table and overight the values in the Data table.

This sis just an example, i actually need to this to 1000s of rows.

Cheers

Simon

Tags (3)
3 Replies
MVP
MVP

Re: Update a table in qlikview with values from a spreadsheet

What could be your end result in above table?

yduval75
Contributor III

Re: Update a table in qlikview with values from a spreadsheet

You need to import your file in the script by this way

MVP
MVP

Re: Update a table in qlikview with values from a spreadsheet

FINAL:

Load *, ID&MonthYear as Key Inline

[

  ID, MonthYear, Value

  1,  May 2012,  10

  1,  Jun 2012,   8

  2,  Apr 2012,  20

  3,  Jun 2012,  15

];

Concatenate

Load *, ID&MonthYear as Key Inline

[

  ID, MonthYear,Value

  1,  Apr 2012, 10

  1,  May 2012, 13

  1,  Jun 2012,  9

  2,  Apr 2012, 12

  2,  May 2012, 18

  2,  Jun 2012,  2

  3,  Apr 2012, 32

  3,  May 2012, 12

  3,  Jun 2012,  1

] Where NOT Exists (Key, ID&MonthYear);

Community Browser