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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
holodan95
Helper II
Helper II

Show exceptions in table visual

Hello All,

 

I'm currently facing a problem with showing only those products that have no stock, or never been to a shop.

 

What I have:

Table 'A' - A table with the products, that need to be in a shop (all distinct)

Table 'B' - A table with all the stock data with: /date/shop/product/stock (many rows are duplicates which I cannot change)

 

In Table 'B', the SQL database automatically generates a row with 0 value, if a product that previously been to the shop is not in stock, however it doesn't, if said product have never been to a specific shop. If the product is in stock, it will generate a value accordingly.

 

From these two, I should be able to show only those products, that have 0 quantity in stock, or never been registered in the shop.

I can only establish a 1:Many relationship between table 'A' and 'B'

 

Example:

Table 'A'

 

Product nameProduct code
AAA

XXX0089

BBB

XXX0090

CCC

XXX0091

 

Table 'B'

DateShop codeProduct nameStock quantity
1S1AAA0
1S1BBB1
1S2AAA1
1S2BBB0
2S1AAA1
2S1BBB0
2S2AAA0
2S2BBB1

 

What I need is a visual table, that gives me back the following, whith these slicers:

Date: 2

Shop code: S2

 

The expected table:

Product nameStock
AAA0
CCC0

 

As you can see, I have product AAA with the 0 amount, and also CCC which has never been to the shop (it will not have a generated line in Table 'B')

 

Is there a way to make this happen? I could already make a table which shows all the products that have been to the shop, with the current stock amount, and on another, all the products possible. However I need the exact opposite. Products with NO value, or which were never in the shop.

 

Thanks for the help!

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@holodan95 Either https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534

Or, Stock Measure = SUM('Table B'[Stock quantity]) + 0

Filter for only 0's for that measure.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@holodan95 Either https://community.powerbi.com/t5/Quick-Measures-Gallery/The-Complex-Selector/m-p/1116633#M534

Or, Stock Measure = SUM('Table B'[Stock quantity]) + 0

Filter for only 0's for that measure.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_DecklerThank you! I can't believe how simple the solution was. 

"Stock Measure = SUM('Table B'[Stock quantity]) + 0" actually worked.

 

Thanks again!

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.