The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 ?
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!
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 )
)
)
)
User | Count |
---|---|
11 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
14 | |
9 | |
7 |