Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
cristian_p_labra
Contributor
Contributor

Create a new table with a new key from an existent table

Good day, pals!

I have a table like this

LOAD
id_company,
name_company,
tax_owed,
tax_paid,
type_company,
type_operation
FROM
..\..\taxes.xlsx

It looks so:

0001 Blue Co. 100 100 Good 01
0002 Yelow Co. 200 100 Bad 00
0003 Red Co. 150 50 Bad 01
0004 White Co. 200 100 Bad 01
0005 Black Co. 120 120 Good 00
0005 Green Co. 130 130 Good 00
0006 Pink Co. 125 25 Bad 00
0007 Silver Co. 180 90 Bad 00

I'd like to create 2 tables

Taxes:
0001 Blue Co. 100 100 1 01
0002 Yelow Co. 200 100 2 00
0003 Red Co. 150 50 2 01
0004 White Co. 200 100 2 01
0005 Black Co. 120 120 1 00
0005 Green Co. 130 130 1 00
0006 Pink Co. 125 25 2 00
0007 Silver Co. 180 90 2 00

Type:
1 Good
2 Bad

For this second table I had to create a sequencial id_field (a key)
I'm really beginner on QlickView, but soon I'll be colaborating, too.

Labels (4)
2 Replies
bharathadde
Creator II
Creator II

 

Try this one, hope this is what you needed

A:
id_company,
name_company,
tax_owed,
tax_paid,
type_company,
type_operation
FROM
..\..\taxes.xlsx;


Qualify *;
UNQUALIFY id_company;

Good:
LOAD
*
Resident A
where type_company = 'Good';

Bad:
LOAD
*
Resident A
where type_company = 'Bad';

cristian_p_labra
Contributor
Contributor
Author

Thank you very much. I'll try this.