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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
depple
Helper III
Helper III

Filtering

Earlier, I have received great help with this issue, but it turned out my table was more complex than I realised, and the solution ceased working as desired. I have tried to tweak on my measures, but to help avail.

 

I wish to create a report where stores with 0 sales of a product is listed (regardless of packaging).

 

The data table has a structure like this:

 

StoreProductCategoryProductSales
Store AAlfaProduct A - Single0
Store AAlfaProduct A - Multipack4
Store ABravoProduct B - Single0
Store ABravoProduct B - Multipack0
Store BAlfaProduct A - Single0
Store BAlfaProduct A - Multipack8
Store BBravoProduct B - Single10
Store BBravoProduct B - Multipack0

 

I have two measures:

1. 

ZeroSale = VAR StoresWithZeroProduct =
FILTER (
VALUES ( 'Table 1'[Store] );
NOT ISEMPTY ( FILTER ('Table 1'; [SumDpak] = 0 ) )
)
RETURN
CALCULATE( [SumDpak]; KEEPFILTERS ( StoresWithZeroProduct))
 
2. 
SumDpak = CALCULATE(SUM('Table 1'[Sales]);ALLEXCEPT('Table 1';'Table 1'[ProductCategory];'Table 1'[Store]))
 
With my current measures the report looks like this:
 
 ProductCategory
StoreAlfaBravo
Store A 0
 
 I want the report to look like this:
 
 ProductCategory
StoreAlfaBravo
Store A40

 

Any suggestions on what I must change to get to the desired result?

 

/depple

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

Hi @depple ,

 

We can create two calculated columns to work on it.

 

 

Column = var sum1= CALCULATE(SUM('Table 1'[Sales]),ALLEXCEPT('Table 1','Table 1'[Store],'Table 1'[ProductCategory]))
return
IF(sum1=0,'Table 1'[Store],BLANK())
New store = IF('Table 1'[Store] in VALUES('Table 1'[Column]),'Table 1'[Store],BLANK())

 

 

 

 

Capture.PNG

 

Please find the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @depple ,

 

We can create two calculated columns to work on it.

 

 

Column = var sum1= CALCULATE(SUM('Table 1'[Sales]),ALLEXCEPT('Table 1','Table 1'[Store],'Table 1'[ProductCategory]))
return
IF(sum1=0,'Table 1'[Store],BLANK())
New store = IF('Table 1'[Store] in VALUES('Table 1'[Column]),'Table 1'[Store],BLANK())

 

 

 

 

Capture.PNG

 

Please find the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

@v-frfei-msft 

 

Thanks a million! It worked perfect, and it also sorted out some other difficulties that I had.

 

/depple

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.