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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Double dimension

Hi,

I have a table that has a number of fields. Two of the fields have similar possible values. I need to do a count on the values of the two similar fields

An example:

RegionSellerAssistantSale
USBobBill10
UKBillTom15
UKBobTom5
USTomBob20
UKBillBob5

I want to find out the COUNT of Sale for each person, regardless if they were the Seller or Assistant. They cannot be both for the same transaction.

The result set would be:

Seller/AssistantCount of Sale
Bill3
Bob4
Tom3

How can I achieve this?

Thanks...

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like this:

INPUT:

LOAD Region,

     Seller,

     Assistant,

     Sale,

     recno() as SaleID

FROM

[http://community.qlik.com/thread/102498]

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

SellerAssistant:

LOAD SaleID, Seller as SellerAssistant

Resident INPUT;

LOAD SaleID, Assistant as SellerAssistant

Resident INPUT;

Then create a chart with dimension SellerAssistant and expression =count(Sale)

View solution in original post

5 Replies
Not applicable
Author

If you want an overview of sales per person you can load both Seller and Assistant in one new column at your load script?

Or simply add up the values. And create a new dimension, but the load will keep your front end faster.

hic
Former Employee
Former Employee

You should create a new dimension in your data model. If your first table is the TransactionTable, you could do this with

Person:

Load Seller as 'Seller/Assistant', TransactionID resident TransactionTable;

Load Assistant as 'Seller/Assistant', TransactionID resident TransactionTable;

HIC

swuehl
MVP
MVP

Maybe like this:

INPUT:

LOAD Region,

     Seller,

     Assistant,

     Sale,

     recno() as SaleID

FROM

[http://community.qlik.com/thread/102498]

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

SellerAssistant:

LOAD SaleID, Seller as SellerAssistant

Resident INPUT;

LOAD SaleID, Assistant as SellerAssistant

Resident INPUT;

Then create a chart with dimension SellerAssistant and expression =count(Sale)

Not applicable
Author

Thanks, swuehl.

That worked perfectly.

Thanks to other too ... all helpful.

Kindest...

Not applicable
Author

Great Idea...