Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

same dimension twice

Is the best/easiest/quickest way to use the same dimension twice is to create the same table again?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Well, I get different numbers, in your example 79375 for those 5 days. If this is correct, try

=sum( aggr(if(sum([List Price]), sum(total<[Salesman ID],Day> [List Price])), [Salesman ID1],[Salesman ID],Day))

Stefan

View solution in original post

19 Replies
swuehl
MVP
MVP

rizo98,

I am not sure if this is the optimal way, but if you are looking for something like attached, at least I do it this way pretty often.

You don't need to copy the complete table, just the fields you need.

Hope this helps,

Stefan

Not applicable
Author

I cant open the qv file as I only have the QV personal edition.

Would you be able to post the script?

But I do understand the idea of only copying the fields I need.

swuehl
MVP
MVP

Sure, quite a simple demo:

Transactions:

LOAD

recno() as TransID,

ceil(RAND()*100) as PersonID,

chr(floor(RAND()*10+65)) as Category

AutoGenerate 150;

 

LOAD

PersonID,

Category as Category2

resident Transactions;

Then I created a grid chart with dimensions Category and Category2 (note that you can re-label to have the same Name displayed), and expression

=if(Category<=Category2,count( distinct PersonID))

Regards,

Stefan

CELAMBARASAN
Partner - Champion
Partner - Champion

This will work.

For first dimension select the field normally.

For second dimension add calculated dimension as =fieldname.

Regards

Celambarasan

Not applicable
Author

My problem is slightly different.

you will recall this thread.

http://community.qlik.com/message/166041#166041

I am trying to create a matrix table.

as shown in attached excel file

the QV is also attached.

CELAMBARASAN
Partner - Champion
Partner - Champion

I couldn't get your problem exactly but check with this,

Load the same table twice by changing the field names and the used the required fields  from the two table as dimension.
It will mostly a cross join.

Regards,

Celambarasan

swuehl
MVP
MVP

Ok, I slightly remember our last yesterday's discussion. How do you read this table?

I assume rev is revenue and has something to do with Salesman ID, and Salesman ID1 determines the RevForDay, right?

Not applicable
Author

I want the table to display this:

Display the individual sales totals for the days my colleagues and I have worked together

so e.g. 2006 has worked with 2005 for 5 days and during these 5 days, he has made sales of 45000, then this should be displayed in the table/pivot along with other indivuals who have also worked on the day(s).

I hope i'm clear

swuehl
MVP
MVP

Well, I get different numbers, in your example 79375 for those 5 days. If this is correct, try

=sum( aggr(if(sum([List Price]), sum(total<[Salesman ID],Day> [List Price])), [Salesman ID1],[Salesman ID],Day))

Stefan