<?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: SELECTEDVALUE, HASONEVALUE not Recognizing Small Multiples in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4321259#M171556</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="296495" data-lia-user-login="j_ocean" class="lia-mention lia-mention-user"&gt;j_ocean&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the description, try using ISFILTERED function to check if the column is being filtered.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR x = IF( ISFILTERED(table[col]), SELECTEDVALUE(table[col], "Default"), "Default" ) RETURN&lt;/LI-CODE&gt;
&lt;P&gt;If the function doesn't work, perhaps multiple separate views need to be made.&lt;/P&gt;
&lt;P&gt;You can also view the following document to learn more information.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/isfiltered-function-dax" target="_blank"&gt;ISFILTERED function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Dec 2024 08:36:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-12-10T08:36:33Z</dc:date>
    <item>
      <title>SELECTEDVALUE, HASONEVALUE not Recognizing Small Multiples</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4320201#M171518</link>
      <description>&lt;P&gt;I have a DAX measure that works perfectly to obtain a filtered value in a matrix visual.&lt;BR /&gt;&lt;BR /&gt;Converting the matrix to a stacked bar chart with one of the variables used for small multiples, the expression simply does not recognize the implicit measure of the small multiples. It DOES recognize the implicit filter in a matrix, or explicit in a slicer. This measure is used as a constant line (in the analysis tab) to return the total of one bar across all bars, for reference. All columns used are on the same table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code at issue is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;VAR x = SELECTEDVALUE(table[col]),"Default") RETURN.... &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tested this by using a new measure&lt;/P&gt;&lt;PRE&gt;DISTINCTCOUNT(table[col]) * (a constant to make it visible) &lt;/PRE&gt;&lt;P&gt;and the result was the total, unfiltered number of possibilities (*the constant) ignoring the small multiple, confirming it is indeed the small multiple implicit filter not being passed to DAX measures vs a problem with my specific DAX measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have a workaround besides just making multiple separate visuals with locked filters and ditching small multiples altogether?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 18:00:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4320201#M171518</guid>
      <dc:creator>j_ocean</dc:creator>
      <dc:date>2024-12-09T18:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE, HASONEVALUE not Recognizing Small Multiples</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4320348#M171528</link>
      <description>&lt;P&gt;sounds like a fun problem to investigate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide sample data that covers your issue or question &lt;STRONG&gt;completely&lt;/STRONG&gt;, in a &lt;STRONG&gt;usable&lt;/STRONG&gt; format (not as a screenshot).&lt;BR /&gt;Do not include sensitive information. Do not include anything that is unrelated to the issue or question. &lt;BR /&gt;Please show the expected outcome based on the sample data you provided. &lt;BR /&gt;&lt;BR /&gt;Need help uploading data? &lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216" target="_blank"&gt;https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 19:50:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4320348#M171528</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-12-09T19:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE, HASONEVALUE not Recognizing Small Multiples</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4321259#M171556</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="296495" data-lia-user-login="j_ocean" class="lia-mention lia-mention-user"&gt;j_ocean&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Based on the description, try using ISFILTERED function to check if the column is being filtered.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;VAR x = IF( ISFILTERED(table[col]), SELECTEDVALUE(table[col], "Default"), "Default" ) RETURN&lt;/LI-CODE&gt;
&lt;P&gt;If the function doesn't work, perhaps multiple separate views need to be made.&lt;/P&gt;
&lt;P&gt;You can also view the following document to learn more information.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/isfiltered-function-dax" target="_blank"&gt;ISFILTERED function (DAX) - DAX | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Wisdom Wu&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 08:36:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4321259#M171556</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-10T08:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE, HASONEVALUE not Recognizing Small Multiples</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4321474#M171563</link>
      <description>&lt;P&gt;I don't think that there will be any way to get this working with small multiples. If you look at the DAX queries generated for the visual, when the measure for the constant line is evaluated it is done in an evaluation context which does not include the column you use to separate the small multiples, so because it is not being filtered at all there is no way to determine which multiple you are currently in.&lt;/P&gt;
&lt;P&gt;My guess is that this is by design for performance reasons. As it is a constant line then the categories should have no impact on its value, and it is only calculated once for the entire visual, rather than having to be calculated multiple times when it should produce the same value.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 10:28:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4321474#M171563</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2024-12-10T10:28:32Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE, HASONEVALUE not Recognizing Small Multiples</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4321912#M171575</link>
      <description>&lt;P&gt;This did not change the behavior of the line but I appreciate the attempt.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:23:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4321912#M171575</guid>
      <dc:creator>j_ocean</dc:creator>
      <dc:date>2024-12-10T14:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE, HASONEVALUE not Recognizing Small Multiples</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4321917#M171576</link>
      <description>&lt;P&gt;I think you are correct, but that seems like a weakness in the design to just assume the small multiple doesn't affect the constant. In this case the constant line does differ based on the small multiple, the point is to showmultiple versions of the same analysis with a slightly varying assumption represented by the line.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I've moved to just making individual visuals with a locked filter.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Dec 2024 14:29:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-HASONEVALUE-not-Recognizing-Small-Multiples/m-p/4321917#M171576</guid>
      <dc:creator>j_ocean</dc:creator>
      <dc:date>2024-12-10T14:29:10Z</dc:date>
    </item>
  </channel>
</rss>

