Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
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?

Partner
Partner

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);