Forum Discussion

ThomasDay's avatar
ThomasDay
Impactful Individual
10 years ago
Solved

Filter a table by values from another

Hello Fellow Dax'ers,

 

I do get stuck when relationships are inactive and I just want a column of "selected" values.  So thanks for your patience as I ask this question.

 

I need to filter the table on the left to make matrix columns using the selection from the RadiusData table in the middle set by a slicer from the right.  Left table ..1-M ..middle table..  M-1.. Right table

 

This is to build a "poor man's radius" filter.  I have a list of ~5000 providers--all of whom are located and I can compute the distances from each to the other--trim that to only pairs that are within 100mi--group them into clumps (0-30, 31-60, 61-100 for example)  So the slicer will have three values...

 

The goal is to enable a user to pick the radius they want to examine for any single provider and get a composite list of all providers within that radius.  Here are the tables and relationships:

Tables and relationshipsRadius slicer 

So--a user picks a Provider from the right table...picks a radius via the slicer....THEN, the relationship to the RadiusData table gives me a selection of all the providers that match the radius.  So far so good.  Now's where I'm Stuck, Stuck, Stuck.

 

With that as lead in here's the question: How do I get this selection from the middle table to filter the table on the left.  The relationship from this middle table to the left table is inactive.

 

So here's my effort to create a "column" for a matrix. But as you can see, I'm tangled up.  I really just need to filter the table and let it's relationships work.  Any strategies or direction would be very much appreciated.  Thanks, Tom

RadiusSelection = 
			Calculate (Values(MeasureReptRecNoProviders[Provider]),
			USERELATIONSHIP(MeasureReptRecNoProviders[ReptRecNo],ToRadiusData[FromReptRecNo]))

 

  • why is your relationship inactive?  If these are the only tables, it is not necessary for it to be inactive (unless there is some other reason of course)

2 Replies

  • MattAllington's avatar
    MattAllington
    Community Champion

    why is your relationship inactive?  If these are the only tables, it is not necessary for it to be inactive (unless there is some other reason of course)

    • ThomasDay's avatar
      ThomasDay
      Impactful Individual

      Yes, great question.  And the answer is no reason .  While there are a bunch more tables, I didn't look carefully at the message which didn't allow me to create the active relationship---turns out I had a complete circle creating ambiguity.  Got rid of that and viola.  

       

      Thanks,

      Tom