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
Highlighted
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

 

3 REPLIES 3
Nathaniel_C New Contributor
New 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

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

Highlighted
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

 

Helpful resources

Announcements
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 94 members 1,717 guests
Please welcome our newest community members: