Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Grouping of data

Hi All, Suppose I have one field Company which has values like TCS,HCL, Infosys, Mphasis etc. when I select TCS in list box than i will see other  IT competiators in other List box including TCS. How we can achieve this ?? Can anyone give me idea Thanks in advance Regards Deepak

8 Replies
sorrakis01
Specialist
Specialist

Hi,

Can you upload your model?

Regards

sunny_talwar

May be like this:

MainTable:

LOAD Company,

          Industry

FROM Source;

Join (MainTable)

LOAD Company as Competitors,

          Industry

Resident MainTable;

sunny_talwar

Example Attached:

Script:

Table:

LOAD * Inline [

Company, Industry, Sales

ABC, IT, 50

DEF, IT, 60

GHI, Finance, 80

ABK, Finance, 100

LBB, Healthcare, 20

TKP, Healthcare, 40

JLK, Healthcare, 30

];

Join(Table)

LOAD Industry,

  Company as Competitor

Resident Table;

When I select Company ABC, I see ABC and DEF as Competitors

Capture.PNG

Not applicable
Author

Thanks Sunny 🙂

Not applicable
Author

Hi Sunny Thanks for your effort but your output is not correct 100 % if we select company ABC than it should return the value of the competitors ABC and DEF which is 50 and 60 but in above post which is not correct . Can you give me some idea to achieve it ?? Deepak

sunny_talwar

This:

Capture.PNG

Not applicable
Author

Thanks a lot sunny. I am facing issue in my data set actually i have multiples fields but i m using only three fields shortname of company, comany name and sales growth. for ex    Inf,Infosys,10.8 there is no unique field in my data set  on which i can join and also there is no extra field defined like Industry as you defined in your dataset. so can you give me idea how to achieve this ??

sunny_talwar

What determines a competitor in that case? In your above example you told us that Industry determined the competitor, hence we used that to join. Once you know what determines a competitor, you will join the competitors using that field.

Does that make sense?