Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Helper I
Helper I

Slicer Select to create flag from other table

Hello team,


I have looked through multiple questions and responses but could not quite replicate the solutions given. The closest answer was this:

How to apply a slicer from one table to another ta... - Microsoft Power BI Community

However, my use case is slightly different. I will try my best to be articulate.

There are two data sets:

Data Set 1 - A primary list of local authorities with a single index

Data Set 2 - Nearest neighbour dataset with a repeated index by local authority

  • I have a data set slicer for UK local authority from Data Set 1
  • I then have a data set that is the nearest neighbours to that local authority. Data set 2
  • I want to then have the visual that shows the local authority selected as well as its geographic neighbours as two groups (‘Selected LA’, Neighbour)
  • So if you select a authority the groups would dynamically change to show these new groups. Pulling from Data Set 2
  • Ideally this would be done so that two columns appear in the original Data Set 1

I unfortuently cannot upload a test document for a reproduciable example. But here are extracts of what each dataset looks like:


Data Set 1

Data Set 1Data Set 1


Data Set 2

Data Set 2Data Set 2




Helper I
Helper I

So I now have a list of neighbours, but I cannot seem to action that into any kind of filtering. Is there any way I can take those items above and make a binary flag in other data set for those names?

Super User
Super User

Hi @jbaisley , although I do not any clear connection between both datasets what you can try to do is to add a TREATAS() to the measure on the visual you shared. Something in the lines of:

measure_name =
    Measure[Your calculation],
    TREATAS ( VALUES ( 'dataset1'[Authority Group] ), 'dataset2'[INDEX LAD22NM] )

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍

You can also check out my LinkedIn!

Best regards,
Gonçalo Geraldes

Thanks @goncalogeraldes. I don't have an existing measure as the data set is wide format I am calling out rows that match the authority name. It would be very time consuming to make a measure for each graphic and then a second for neighbour selection. Ideally it would be a binary flag in existing data meaning I could simply pull the column though as a group and then aggregate ethe values I need by that group then and there. If it helps to restate my question. How can I have a dynamic measure/ column appear in Dataset1 when a slicer selects an authority in DataSet 1, such that a group of authorities is selected from Dataset2 so that they can be used a legend in graphics. In theory the measure should just be a list of place names, should it not?

I may have solved it. Then use this measure as the legend? It gives me the right output. Its where it can be used as intended.Capture4.PNG

Measure = var  a = VALUES(Data Set 1[Authority])
IF(MAX(Data Set 2[Authority]) in a, 1,0)


Helpful resources

PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors