Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Help with identification of certain records

Hi everyone,

I am currently working with a document that contains a customer ID and all of the accounts that each customer has. These accounts can belong to either company 1 or company 2. The way that I am displaying this data is via a pivot table with the customer ID as the main dimension, the account number as the second dimension, and the company name as the third dimension. So for one customer ID I can have multiple account numbers, each with a specific company name.

What I would like to do is identify those customer IDs that contain accounts in both company 1 and in company 2 and only display those. Is there any way that I can do this?

Thanks!

1 Solution

Accepted Solutions
marcus_sommer
Not applicable

Re: Help with identification of certain records

It should also work with a condition within the dimension, like:

if(aggr(count(distinct company), [customer ID])>1, company)

Maybe as an alternatively you could use concat(company, ', ') as expression or dimension (then wrapped in an aggr) to show your data.

- Marcus

2 Replies
avinashelite
Not applicable

Re: Help with identification of certain records

Hi Matthew,

try like this:

1.Add one list box for the company so that when you select a company you will get the records details.

2.Add company dimension in the Pivot table so that it will be help full.

3.If you do not have the company details in the DB then while loading try like this

company1:

Load 'Company1' as company name,

filed1,

filed2

from table1


company2:

Load 'Company2' as company name,

filed1,

filed2

from table2


Hope this helps you

marcus_sommer
Not applicable

Re: Help with identification of certain records

It should also work with a condition within the dimension, like:

if(aggr(count(distinct company), [customer ID])>1, company)

Maybe as an alternatively you could use concat(company, ', ') as expression or dimension (then wrapped in an aggr) to show your data.

- Marcus