You can use the AutoNumberHash128 function to generate you an unique key...
Go to read the EXCELLENT Rob's writing about that : http://community.qlik.com/blogs/qlikviewblogs/archive/2008/05/29/memory-sizes-for-data-types.aspx
Yep, like I posted later on, I´m using the autonumbering for the key but to create the key, every table has to have the same data right? So i can´t give the customer and the item table the same key.
One solution is joining all the data of customers and items into a one table and then concatenating the key from there... But how efficient will this be?
Is there a more efficient way, besides I tried the joining once and id didn´t actually work out as i´d wanted it to...
Ok, poorly illustrated above i´ll try to be more specific, but you´ve just gotten to the question.
I should maybe draw a picture, but i´m feeling too lazy right now so i´ll just put it in ascii format here...
/ | \ / | \
KPI purchasing KPI Sales KPI logistics
ID ID ID
Dimension Dimension Dimension
PurchCust SalesCust LogistCust
PurchItem SalesItem LogisticsItem
Ok, now if i generate a key that has the id, dimension and the customer name, i cannot connect it to items right?
And if i create a key for items holding the respective fields, that will probably cause a circullar loop.
Now one possibility comes to mind, if the customer and item tables could be joined so that there would be id,dimension,custname and itemname all in the same table and then generate the key.
The point in this mind game is to create filters(n ammount, depending on how many different kinds of data we want to be "globally" accessible) that would show all the customers and all the items and not having to create their respective filters.
I'm lost on the "Dimension" field. I gather that you might be saying "Dimension" to actually stand for one or more dimensions, but as written, it appears that all tables specify the same field value in a very denormalized and seriously circular-reference way.
How about this - can you post some example data that would be in all of these tables? Then maybe I can figure out how I'd lay out the data instead of how you've done it.
Sorry for not following up, but I´ve been a bit busy. The dimension field was supposed to be just any kind of field on an abstract level. So don´t pay too much attention to it.
I´ve already solved this problem in a way of concatenating everything into an autonumbered key... and I guess it´s pretty much the only way to actually get the desired selections to traverse where I want them to.
I was just hoping that there would be another way of implementing this action. Also seems that I wasn´t too good in explaining what I wanted =). But thanks to all of you guys who answered me, I think Í´ll drop the subject for a while and stick with my concatenated key.