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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
manoj619
Regular Visitor

Power bi desktop

In Power BI, I need to create a display that shows only the values from Table B that are not present in Table A, based on the selected country from a dropdown filter

 

Table a

Car    Country

tata    india

tata    swiss

swift   pak

benz   swiss

swift   India

kia       pak

Byd.   Lanka

Byd    India

 

Table b

Brand year 

benz   2000

kia      2001

tata    2002

Volvo 2003

 

 

example:

 if i select pak in dropdown the output should be

Benz 2000

tata 2002

Volvo 2003

 

If i select india the output should be

benz 2000

Kia 2001

Volvo 2003

4 REPLIES 4
Anonymous
Not applicable

Hi, @manoj619 

 

You can try the following methods.

Measure = 
VAR SelectedCountry = SELECTEDVALUE('Table a'[Country])
Var  _table=
FILTER( 'Table b',
NOT 'Table B'[Brand] IN
CALCULATETABLE( VALUES('Table a'[Car]),'Table a'[Country] = SelectedCountry))
RETURN
IF(SELECTEDVALUE('Table b'[Brand]) in _table,1,0)

vzhangtinmsft_0-1742365550933.png

Is this the result you expected?

 

Best Regards,

Community Support Team _Charlotte

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

i got error as the number of arguments is invalid. Function containsrow must have value for each column in the table expression 

bhanu_gautam
Super User
Super User

@manoj619 

Ensure that there is no direct relationship between Table A and Table B.

Use the 'Country' column from Table A to create a dropdown filter.

Create a new calculated table that will contain the brands from Table B that are not present in Table A for the selected country.

 

DAX
FilteredBrands =
VAR SelectedCountry = SELECTEDVALUE('Table A'[Country])
RETURN
FILTER(
'Table B',
NOT 'Table B'[Brand] IN
CALCULATETABLE(
VALUES('Table A'[Car]),
'Table A'[Country] = SelectedCountry
)
)

 

Use a table visual to display the values from the FilteredBrands table.




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






showing expression refers to multiple columns cannot be converted a scale value

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.