<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Retrieving the current page filters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Retrieving-the-current-page-filters/m-p/4605489#M176295</link>
    <description>&lt;P&gt;I don't think that this will be possible because of the way filters work. Even if you specify the condition as a boolean, filters are always tables of values which already exist in the data. For example, if you specify 'Table'[Column] &amp;lt; 5 as a condition, that might be translated into a list like { 0, 1, 2, 3, 4 }. But if you don't have any entries where the value is 3 then the list would be&amp;nbsp;{ 0, 1, 2, 4 }.&lt;/P&gt;
&lt;P&gt;Given that, if you try to use as a filter a value which doesn't exist in your data then Power BI will basically just throw that value away.&lt;/P&gt;
&lt;P&gt;Having said that, you might be able to detect the fact that a missing value was passed in, even if you can't detect what the value was. You could create a measure like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Missing value used as filter =
IF (
    ISFILTERED ( 'Table'[Column] ) &amp;amp;&amp;amp; ISEMPTY ( FILTERS ( 'Table'[Column] ) ),
    1
)
&lt;/LI-CODE&gt;
&lt;P&gt;This checks that there is a filter applied to the column, but the values or condition applied don't match any of the existing data.&lt;/P&gt;</description>
    <pubDate>Tue, 11 Mar 2025 16:13:36 GMT</pubDate>
    <dc:creator>johnt75</dc:creator>
    <dc:date>2025-03-11T16:13:36Z</dc:date>
    <item>
      <title>Retrieving the current page filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Retrieving-the-current-page-filters/m-p/4605367#M176290</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If I pass a filter to a report in a URL it becomes a page filter.&amp;nbsp; Is there any way to retrieve that filter condition when there are no rows matching the condition?&amp;nbsp; As there are no rows I can't use SELECTEDVALUE() and I can't see anything else I could use.&amp;nbsp; I understand that this would be complex as the condition could be equals, not equals, etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;This isn't my example, but a trivial example might be a web site where someone enters their search term "tomato" which is passed as a filter to the URL and the report would not contain any tomato data so could show a message "sorry, tomato not found".&amp;nbsp; In my case I can't ensure that the value passed is always present in the data.&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 15:00:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Retrieving-the-current-page-filters/m-p/4605367#M176290</guid>
      <dc:creator>Millstone1998</dc:creator>
      <dc:date>2025-03-11T15:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieving the current page filters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Retrieving-the-current-page-filters/m-p/4605489#M176295</link>
      <description>&lt;P&gt;I don't think that this will be possible because of the way filters work. Even if you specify the condition as a boolean, filters are always tables of values which already exist in the data. For example, if you specify 'Table'[Column] &amp;lt; 5 as a condition, that might be translated into a list like { 0, 1, 2, 3, 4 }. But if you don't have any entries where the value is 3 then the list would be&amp;nbsp;{ 0, 1, 2, 4 }.&lt;/P&gt;
&lt;P&gt;Given that, if you try to use as a filter a value which doesn't exist in your data then Power BI will basically just throw that value away.&lt;/P&gt;
&lt;P&gt;Having said that, you might be able to detect the fact that a missing value was passed in, even if you can't detect what the value was. You could create a measure like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Missing value used as filter =
IF (
    ISFILTERED ( 'Table'[Column] ) &amp;amp;&amp;amp; ISEMPTY ( FILTERS ( 'Table'[Column] ) ),
    1
)
&lt;/LI-CODE&gt;
&lt;P&gt;This checks that there is a filter applied to the column, but the values or condition applied don't match any of the existing data.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Mar 2025 16:13:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Retrieving-the-current-page-filters/m-p/4605489#M176295</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-03-11T16:13:36Z</dc:date>
    </item>
  </channel>
</rss>

