Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Krcmajster
Helper IV
Helper IV

filtering one table based on another and on dynamic measure

Hi All, 

 

Unfortunately I can't share my pbix file and for some reason unable to attach pictures but here is the story:

I have 2 tables, both have columns where multiple values match with multiple values from another. I also found a great formula to filter based on distance I select from parameter. now filtering anything from the table to which the formula relates is fine with a formula. Problem is that I want also for other table to filter if any value from the first table contains value that matches the one in second table. 

This is the formula for establishing distance https://dataveld.com/2019/03/20/display-points-within-a-distance-radius-on-a-power-bi-map/

 

Table1                                                                                                                        Table2

 

Location    NUTS code         Lat          Long                                                             ID                Values    Year

         L1      NL33                   1111       1111                                                             Nl33            V1           2019

         L2      NL33                   1112       1112                                                             NL33           V2            2020

         L3      NL 31                  22222      2222                                                            NL31           v3             2019

                                                                                                                                  NL31          V4            2020

 

 

E.g. location 1 has nuts code NL33, location 2 has nuts code NL31, and location 3 has nuts code NL33

when paramter is set to 10 (km) all 3 locations will apear. But if i reduce it to 5 (km) only location 1 and 3 will apear, which both have nuts code NL33. Now if I build a chart I want in it to be filtered by NL33, removing others. Is that possible?

 

 

 

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Krcmajster ,

I have a little confused about your requirement.


E.g. location 1 has nuts code NL33, location 2 has nuts code NL31, and location 3 has nuts code NL33

when paramter is set to 10 (km) all 3 locations will apear. But if i reduce it to 5 (km) only location 1 and 3 will apear, which both have nuts code NL33. Now if I build a chart I want in it to be filtered by NL33, removing others. Is that possible?


Why all 3 locations will apear when paramter is set to 10 (km) all 3 locations and show  location 1 and 3 when the parameter is reduced to 5 (km)? What is the logic?
In addition, it seesm that the location L1 and L3 have different nuts code.

Besides, what does mean of the chart to be filtered by NL33, removing others?

If it is convenient, could you explain it in details or share your desired output.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-piga-msft You can find the tables below and chart I want to be filtered. If I use CONTAINS it will filter the chart if there is at least one NUTS code. However I want for chart to be filtered based on the radious I select. So if I select radious of 5 km and there are 3 locations and they all fall under NL31, I want only to blue line the be shown. If I expand to 15 km, there will be location that has NL32 NUTS code, so I want that line to be shown as well then.

 

chart.JPG

 

Table 2Table 2Table 1Table 1

 

havarnese.JPG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.