Further I have a Pie Diagram with dimension pID and formula COUNT(pID) from table Typs. By doing this I calculate the ratios of the locations correctly.
My problem is that in the legend of the diagram the names of Typs.pID will be used and I need to display the corresponding names of Locations.Location. I tried searching for similar issues and ended with no success...
So how do I replace A.1 with someName etc. in the legend of an diagram?
If your dimension is pID, then your legend will display pID (not Typ as you've stated in your post). It is also a little unclear as to what you're trying to achieve. Perhaps post a sample QVW, and/or sample image of the desired result?
I need to count the relationships between locations and typs. Your proposal will count (and display) the locations only once for their appearance in Locations. So for each Location it will be 1/n (if n is the total number of rows in Locations).
What I need is to count the appearances of a single Location (this is why I count pID) in Typs and use the name of given in Locations (mapped by pID).
Each counting in table Locations will lead to faulty values.