Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
nihhalmca
Specialist II
Specialist II

Update Field4 and 5 according to Field1,2 and 3

Hi All,

I have a file with 5 fields. for example

If Field1, Field2, Field3 values are same then i need to update Field4 and Field5 values according to file in dashboard.

Dashboard already has these fileds. So i need to update Field4 and Field5 colums according to file.

How can we implement?

I have attached sample file here.

1 Solution

Accepted Solutions
sunny_talwar

I see what you mean now. Why don't you use a Mapping Load to make update. Create two mapping tables, one for field4 and other for field 5

MappingTable1:

Mapping

LOAD Field1&'|'&Field2&'|'&Field3 as Key,

           Field4

FROM ....;


MappingTable2:

Mapping

LOAD Field1&'|'&Field2&'|'&Field3 as Key,

           Field5

FROM ....;

FactTable:

LOAD ....,

          ApplyMap('MappingTable1', Field1&'|'&Field2&'|'&Field3, Field4) as Field4,

          ApplyMap('MappingTable1', Field1&'|'&Field2&'|'&Field3, Field5) as Field5

....;

Or you can do a left join.....

View solution in original post

3 Replies
sunny_talwar

Would you be able to provide a sample with expected output?

nihhalmca
Specialist II
Specialist II
Author

Hi Sunny thanks for your response.

I have attached sample file to original post.

sunny_talwar

I see what you mean now. Why don't you use a Mapping Load to make update. Create two mapping tables, one for field4 and other for field 5

MappingTable1:

Mapping

LOAD Field1&'|'&Field2&'|'&Field3 as Key,

           Field4

FROM ....;


MappingTable2:

Mapping

LOAD Field1&'|'&Field2&'|'&Field3 as Key,

           Field5

FROM ....;

FactTable:

LOAD ....,

          ApplyMap('MappingTable1', Field1&'|'&Field2&'|'&Field3, Field4) as Field4,

          ApplyMap('MappingTable1', Field1&'|'&Field2&'|'&Field3, Field5) as Field5

....;

Or you can do a left join.....