Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
georgwildmoser
Contributor II
Contributor II

QlikView table: How do i show the main industrie in every line

Hello,

maybe the question has already been asked, but I didn't find the post. My requirement is the following:

I have created a table with sales information about the customer and I want to expand it. The extension should give me the main industry of each customer in every line.

 

This is what the current table looks like:

image.png

This should show the table in the future:

image.png

The customer's main industry is the one with the highest turnover of the customer. This should be determined using a formula. I've already tried aggr and rank, but I don't get the information for every line by customer. 

I'm stuck here and would be happy to get some help.

Thanks in advance.

 

 

 

 

 

Labels (5)
1 Solution

Accepted Solutions
Saravanan_Desingh

One solution is.

tab1:
LOAD * INLINE [
    customer, industries, revenue
    Cust A, Aero, 40
    Cust A, Elec, 10
    Cust A, Mech, 20
    Cust A, Process, 30
    Cust B, Elec, 11
    Cust B, Mech, 22
    Cust B, Process, 33
];

Left Join (tab1)
LOAD customer, FirstSortedValue(industries, -revenue) As [main customers industry]
Resident tab1
Group By customer
;

commQV38.PNG

View solution in original post

1 Reply
Saravanan_Desingh

One solution is.

tab1:
LOAD * INLINE [
    customer, industries, revenue
    Cust A, Aero, 40
    Cust A, Elec, 10
    Cust A, Mech, 20
    Cust A, Process, 30
    Cust B, Elec, 11
    Cust B, Mech, 22
    Cust B, Process, 33
];

Left Join (tab1)
LOAD customer, FirstSortedValue(industries, -revenue) As [main customers industry]
Resident tab1
Group By customer
;

commQV38.PNG