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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Hide selection from the slicer if there is no value in the measure on the table view

Suppose we have a measure let's say average sale price for products in the selected date range 
and we have a slicer for products.

In a scenario we have a product does not have average sale price in the selected date range
so, it will be no result in the table, sure.

business wants to "not see that product in the slicer selection" because it does not have a value in the table results

can we possibly do that ?

2 REPLIES 2
Anonymous
Not applicable

I just want to make sure the logic is expressed here @tamerj1 
First, we have a measure which brings average sale price for each products right?
for selected date range (slicer) there are avg sale price values.  fine.
but when you select specific product name from the slicer there is no result for selected date range in the table view right ?

user wants to remove that selection (product name in the slicer) from the slicer,because there is no value for the selected date range in the slicer. 

if there is a value for selected date range they want to see available options (product names) in the slicer to they are planning to lower the numbers of product names in the slicer depending on the date range where there is no average sale price.

I just wanted to make sure we are on the same page. because this dax is not working.

ask me if you need a sample for this i can write down some scenario
thanks!

tamerj1
Super User
Super User

Hi @Anonymous 

Place the following filter measure in the filter pane of the product name slicer, select "is not blank " the apply the filter. 

FilterMeasure =
COUNTROWS (
FILTER (
VALUES ( 'Product'[Product Name] ),
'Product'[Product Name]
IN CALCULATETABLE (
VALUES ( 'Product'[Product Name] ),
CROSSFILTER ( 'Product'[Product Key], 'Sales'[Product Key], BOTH )
)
)
)

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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