Forum Discussion
Help with measure
- 10 years ago
My suggestion that is what I would do ( although don't know your other visuals ) is to create an active relantionship Extension - ToNumber and inactive relantionship with Extension - FromNumber..The measures can be
Calls in = COUNTROWS( Calls ) Calls Out = CALCULATE ( COUNTROWS ( Calls ); USERELATIONSHIP ( Extensions[Extension]; Calls[FromNumber] ) )This way you won't have to change your visual or your model.
It looks like there may be an issue with your model, does the "total calls by ext..." table combine the calls in and out?
If so using it to link through to the extentions table may cause issues.
Try changing the link from calls table to link directly to extensions.
I find this quite useful to describe how to set up tables and links - http://www.powerpivotpro.com/2015/10/giving-back-steal-this-reference-card/
The total calls by extensions does a union of a select all toNumber and FromNumber rows where they involve an internal extension so there could be two rows with the same CallID but two different extensions when two people call each other in the office.
Moving the relationship from the ToNumber on the Calls table directly to the Extensions table fixed it. The problem is I cannot add another relationship from the FromNumber to the Extentions table because it cannot have multiple relationships on the same column in the Extension table for the Calls Out measure.
- jbernard8210 years agoNew Member
I guess I could just duplicate the Calls table just to get the relationship for this to work but that could mess up other visuals unless creating a relationship between the two on the CallID field would take care of that. Thoughts?
- itchyeyeballs10 years agoImpactful IndividualYou need to get your model right before you go any further otherwise your measures will become ever more complex to get around underlying issues.
As mentioned in your other thread, I would look at unpivoting the calls table so that incoming and out going calls are separate rows. If every call has a unique Id you can avoid double counting internal calls by filtering in your measures