cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sunithadevadass Frequent Visitor
Frequent Visitor

Missing Products from another table

Hi Experts, Can someone help me with the below please?

My requirement is show data in 2 tables - list of products a customer has and missing products from another table. Tried couple of solutions but I’m not getting the desired results. 

 

Table 1 – this table has 163,041 records and it is a list of all customer and their products

ID

Name

Product id

Product Name

11

A

2

B

22

B

5

E

33

C

6

F

11

A

1

A

11

A

4

D

 

Table 2 – Product catalogue (around 2200 records)

Product ID

Product Name

1

A

2

B

3

C

4

D

5

E

6

F

7

G

 

Desire results in PBI – On clicking customer name, i.e,., if I click on A, the corresponding tables below should show list of products that a customer has and missing products

 

ID

Name

Region

11

A

X

22

B

Y

33

C

z

  

Customer products                               

Product Id

Product Name

1

A

2

B

4

D

   

Missing products

Product ID

Product Name

3

C

5

E

6

F

7

G

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-lid-msft New Contributor
New Contributor

Re: Missing Products from another table

Hi @sunithadevadass,

 

We can use the feature that the table will hide blank value, create a measure using following

 

pname = 
VAR a =
    CALCULATETABLE (
        VALUES ( Table1[Product Name] ),
        FILTER ( Table1, Table1[Name] = SELECTEDVALUE ( 'Table1'[Name] ) )
    )
RETURN
    IF ( MAX ( Table2[Product Name] ) IN a, BLANK (), 1 )

Then we can use this feature to meet your second requirement. But remember to close the “show items with no data” option.

 

Missing-Products-from-another-table-1.pngMissing-Products-from-another-table-2.png

 

BTW, pbix as attached.

 

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

 

View solution in original post

3 REPLIES 3
Nathaniel_C Super Contributor
Super Contributor

Re: Missing Products from another table

Hi @sunithadevadass ,

What have you tried so far?

Product owned.PNG

 

The first requirement works with no relationship between the two tables.

Nathaniel

Highlighted
sunithadevadass Frequent Visitor
Frequent Visitor

Re: Missing Products from another table

Hi Nathaniel, I'm struggling with the missing product table tried couple of solutions that I found in this forum but i'm not getting the correct results, i.e., the missing product table is showing all products. 

 

 

Capture.PNG

v-lid-msft New Contributor
New Contributor

Re: Missing Products from another table

Hi @sunithadevadass,

 

We can use the feature that the table will hide blank value, create a measure using following

 

pname = 
VAR a =
    CALCULATETABLE (
        VALUES ( Table1[Product Name] ),
        FILTER ( Table1, Table1[Name] = SELECTEDVALUE ( 'Table1'[Name] ) )
    )
RETURN
    IF ( MAX ( Table2[Product Name] ) IN a, BLANK (), 1 )

Then we can use this feature to meet your second requirement. But remember to close the “show items with no data” option.

 

Missing-Products-from-another-table-1.pngMissing-Products-from-another-table-2.png

 

BTW, pbix as attached.

 

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

 

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 118 members 1,550 guests
Please welcome our newest community members: