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

combine 2 field

hi guys,

I have a file, where there is 2 field like city and country.

I'd like to calculate sore for country and cities in 1 table.

Score1Score2Score3Score4
47611861
47463545
47445
58564223
541388
44783365
88881358
8564512
4642388
2572874
77127275
86793565
78881614
1278432
86483523
26231575
35891356
78421288

Please find my attached file.

Thanks,

14 Replies
jpapador
Partner - Specialist
Partner - Specialist

Can you be more specific in your attachment your inline table is one single table, so you can already calculate score in one table with both city and country if you add them both as dimensions.

reshmakala
Creator III
Creator III

Hi,

Modify your script as below:

Data:

LOAD* Inline [

name1,name2,Score1,Score2,Score3,Score4

aaaa,canada,4,7,4,45

sddssd,usa,58,56,42,23

sadfsdf,usa,5,4,13,88

cxgtry,canada,44,78,33,65

ty67,canada,88,88,13,58

ry67,usa,8,56,45,12

yrsafdg,usa,46,4,23,88

dgtru,usa,25,72,87,4

hgyui9,usa,77,12,72,75

gtrutyi,canada,86,79,35,65

htruityi,usa,78,88,16,14

gtruii,usa,12,78,4,32

wewerer,usa,86,48,35,23

dfghty,canada,26,23,15,75

thjuyi,canada,35,89,13,56

truy,usa,78,42,12,88];

LOAD name2 as name1

Resident Data;

Just add the last load statement for the fields that you wish to combine. The name1 now has both name2 and name1 values.

Anonymous
Not applicable
Author

I combined 2 fields in 1, but there is no total count for countries

sunny_talwar

Is this what you are looking for? PFA

Best,

S

Anonymous
Not applicable
Author

Looks like I wanted.

I hope it works for my purpose.

I need to only average, I need also %

sunny_talwar

What % are you looking for??

Best,

S

Anonymous
Not applicable
Author

Also I have where there is tags Yes and No. I need also to show  only Yes %.

sunny_talwar

It seems that you are talking about columns which you have not mentioned in your initial post. Would you be able to share a data source/qvw file which have all the columns you want to use in the thing you are trying to achieve.

Best,

S

reshmakala
Creator III
Creator III

What is the condition for the tags Yes and No?