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
Dunner2020
Post Prodigy
Post Prodigy

Combining two columns of different tables to make a filter

Hi there,

 

I have two dimension tables which look like as shown in the following picture:

 

Table 1:

leo_89_0-1603848094424.png

 

Table 2:

leo_89_1-1603848228142.png

 

Code of Table 1 and Circuit code of Table 2 together make meaningful information in the fact table. Now I want to make a filter (drop-down list) that performs would be a combination of code of table 1 and Circuit code of table 2 to filter the data of the fact table.  Is it possible in Power BI?

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Dunner2020 

 

It’s my pleasure to answer for you.

According to your description, I think you can merge the two tables to a new table with two columns then use.

First you need to create two index columns for the two tables.

Like this:

v-janeyg-msft_0-1604026257599.png

Here is my sample .pbix file. Hope it helps.

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi I'm not sure I fully understand your point, but I have below 2 options for you:

alex00321_0-1604045954178.png

this is for filtering on chart, it shows this:

alex00321_1-1604045988052.png

And if I use DAX, this is what I have:

Updated Circuit Code = CALCULATE(MAX('Table 2'[Circuit Code]),
FILTER('Table 2','Table 2'[Circuit Code]<>BLANK()),
RELATEDTABLE('Table 1'))
 
Data is what you provided. Thanks!
v-janeyg-msft
Community Support
Community Support

Hi, @Dunner2020 

 

It’s my pleasure to answer for you.

According to your description, I think you can merge the two tables to a new table with two columns then use.

First you need to create two index columns for the two tables.

Like this:

v-janeyg-msft_0-1604026257599.png

Here is my sample .pbix file. Hope it helps.

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Dunner2020 ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.

@amitchandak , For example, I want to have drop-down list filter that shows the combination of both columns from the two different tables as shown in the following figure:

 

leo_89_0-1603914142580.png

 

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.