Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sort by

Dears,

I've 4 collumns in my spreadsheet. The first one "contains or not" the text is Job1, the second one contains or not the text Job2, in the third one, Job3 and in the last one Job4.

This data cames from our internet system, that asked to our customers what is his funcion at the company.

So, in the Collumn 1, we will have on only the values "Job1" or nothing "blank cells".

But the same customer can have more than 1 Job, so, the following situation can occour:

CustomerJob1Job2Job3Job4
Customer1Job1Job2Job3Job4
Customer2Job2Job3Job4
Customer3Job3Job4
Customer4Job4
Customer5Job1
Customer6Job2
Customer7Job3
Customer8Job4
Customer9Job1Job3
Customer10Job2Job4

So, what I woud like to do is to create a list box with the information (Job1, Job2, Job3 and Job4 only). And when I select one of this options the system will filter to me the customers that had choosed this Job.


Example: Imagine that I've sorted Job3, so the customers that will be shown is:

CustomerJob1Job2Job3Job4
Customer1Job1Job2Job3Job4
Customer2Job2Job3Job4
Customer3Job3Job4
Customer7Job3
Customer9Job1Job3

So, how can I do it?

It's not a concatenation...

Did you get it?

Thanks for your attention

Bye

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Please check attached.

Hope this helps,

Stefan

View solution in original post

7 Replies
swuehl
MVP
MVP

Hi,

maybe like attached?

I used a crosstable load to get your table in and then created a pivot table with expression:

=only({<Customer = p({<Data=p(Jobs) >} Customer ),Jobs= >} Data)

Hope this helps,

Stefan

Not applicable
Author

Sorry, but I didn't understand!

Can you do another example for me?

swuehl
MVP
MVP

Could you take a look at above attached sample file or do you work with a personal edition?

Not applicable
Author

Thank you so much for your assistance but I didn't understand it yet!

Canyou do an example using excel!

swuehl
MVP
MVP

Yes I could do also an example using excel, but the structure of my sample excel file would be the same, wouldn't it (unless you specify another data structure)?

This is my script:

Crosstable:

CrossTable(Jobs, Data)

LOAD Customer,

     Job1,

     Job2,

     Job3,

     Job4

FROM

[http://community.qlik.com/thread/38185?tstart=0]

(html, codepage is 1252, embedded labels, table is @1);

Result:

NOCONCATENATE LOAD Customer, Jobs, if(Data='',NULL(), Data) as Data resident Crosstable;

drop table Crosstable;

If I would use an excel file, the only difference would probably be the two lines directly after FROM, where I specify to load your above table from the web.

The following resident table load is only used to remove some unwanted blank values from the data, you may or may not need to use this for your real data (probably not, if you load from DB).

As you see, I use a crosstable load, please take a look in the manual on how this works, it transforms a crosstable back to "standard" data layout.

How to create a pivot table chart with the two dimensions Customer and Jobs is clear, isn't it?

Then I used this as only expression:

=only({<Customer = p({<Data=p(Jobs) >} Customer ),Jobs= >} Data)

This is a set analyis expression, this looks a bit complicated at first, but it says just

Select all customer who have a relation with the selected Jobs, then clear the selection on jobs to allow viewing all jobs (both selections are only in the context of the table object's expression, this is not a selection that will affect other objects).

Hope this clears some points, if not, please clarify your problems.

Regards,

Stefan

Not applicable
Author

Sorry, but it's my first time using QlikView and it's so advanced for me!

Follow attached is an example in Excel.

Can you do the same thing for me with this spreadsheet?

I need a list with only 4 Options (Manager, Administrator, Engineer and Marketing). But as you can see they are listed in 4 different collumns. And what I need is this list sorting the values!

Thanks for your attention,

Best regars,

swuehl
MVP
MVP

Please check attached.

Hope this helps,

Stefan