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

Scripting Help

Hello guys,

I have 2 tables like below.

TableA :

Column1Column2Comment

Comment Column includes some Comment Sentence. Comment Sentence having some words like Column "Word" from TableB.

Those are having Word as frustrating or frustrated or frustration where i have to apply FLAG as CE negative,

Those are having Word as efficient or prompt or satisfied where i have to apply FLAG as CE positive and so on...

But the thing is that their is no linking between TableA and TableB.

TableB:

TagsWords
CE negativefrustrating, frustrated, frustration
CE positiveefficient, prompt, satisfied
Staff poor

friendlier, rude, not pleasant

Please help me for this task....

-- Thanks and Regards,

Villyee Anderson

23 Replies
vanderson009
Creator III
Creator III
Author

Hello Richard,

Please have look at image that i have posted here, which is from your QVW applicatation that i have marked as Helpful.

When i select CE_negative then "I felt really frustrated about my service" only this comment will show

and so on....

- Thanks

Villyee Anderson

richard_pearce6
Luminary Alumni
Luminary Alumni


Hi Villyee,

I see what you mean. I've updated the file to show how this could be acheived. An extra field has been incerted into 'Main 3' tab which adds the Tag value. This has also been added to the group by.

The result means you'll have a one to many link on your ID field now. So this table could hang off your main fact table.

Please let me know if you need anything else

Richard

richard_pearce6
Luminary Alumni
Luminary Alumni

QVW

richard_pearce6
Luminary Alumni
Luminary Alumni


Just noticed you have lines where all rows are zero, this can be removed by using a where statement on the aggregation reload

rangemax(Field1,Feild2,etc>0

 

// Sum up the results

TableA:
NoConcatenate
Load
ID
,
Tags
,
sum(CE_Negative) as CE_Negative
,
sum(CE_Positive) as CE_Positive
,
sum(Staff_Poor) as Staff_Poor
Resident TableA_Temp
Where RangeMax(CE_Negative,CE_Positive,Staff_Poor)>0

group by ID,Tags
;

Edited: this needs to be > 0 as you could find multiple words in the comments for the same tag

Richard