Forum Discussion
Can't use Measure value in filter?
I'm following this Guy in a Cube but I can not get it work:
Nothing selected in Power BI Slicer? Then don't show data! - YouTube
I then set the table to have an added visual filter for that Measure but the table is not responsive to the filter.
When I make a selection in the slicer the "Is Name Filtered" value changes, but the table doesn't react.
- Anonymous1 year ago
Hi sasdfasdfsad ,
Thanks for lbendlin reply!
sasdfasdfsad The link you provided can't open, but there is another method about your question.
Create the measure and add it to Columns of Table visual.
Measure = CALCULATE ( IF ( ISFILTERED ('Table'[Name] ), 1, 0 ), ALLSELECTED ('Table') )The modify the Filter and click "Apply filter".
When I select nothing, the table shows nothing.
Best regards,
Mengmeng Li
6 Replies
- lbendlin
Super User
The measure actually needs to have an impact on the rows that contribute to the visual.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523- sasdfasdfsad
Advocate IV
Ah okay.
So the issue here then is that the measure when it applies to the data table IS returning 1 /True for filtered because it's evaluating for the row context of each table row and that is applying a filter....
So, is there a way to test if the slicer itself is filtered but NOT get stuck in the row context as I want the field the slicer is filtering to ALSO be displayed in the data table visual.
I just want to determine if the slicer on the page for "Name" has been checked.
If checked, show, if no selection made, don't show data.- lbendlin
Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- AnonymousNot applicable
Hi sasdfasdfsad ,
Thanks for lbendlin reply!
sasdfasdfsad The link you provided can't open, but there is another method about your question.
Create the measure and add it to Columns of Table visual.
Measure = CALCULATE ( IF ( ISFILTERED ('Table'[Name] ), 1, 0 ), ALLSELECTED ('Table') )The modify the Filter and click "Apply filter".
When I select nothing, the table shows nothing.
Best regards,
Mengmeng Li