<?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 SELECTEDVALUE measure from slicer keeps returning blank value when used on another measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-measure-from-slicer-keeps-returning-blank-value/m-p/4784667#M183208</link>
    <description>&lt;P&gt;So I have this simple dropdown slicer which is a list containing only a couple of dates, which in turn comes from a single-column table currently with NO relationship to either the date and the fact tables (CalData and Contas_a_Pagar respectively) in the semantic model:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Then I created the following measure that picks up whatever choice I made on the aforementioned slicer:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Data-base = SELECTEDVALUE(Data_Base_Lista[Data-base])&lt;/LI-CODE&gt;&lt;P&gt;And when I drop this measure on a card visual it works just fine, so the measure is in fact picking up my date slicer choice:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;U&gt;PROBLEM:&lt;/U&gt; However, when I define and evaluate the same measure on DAX query view, it returns BLANK:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;↓↓↓↓↓↓↓&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The problem is that I'm using this measure as a base date to calculate other measures, for instance to calculate the total of invoices whose due dates are &lt;U&gt;on or after&lt;/U&gt; the selected base-date, and this measure is instead returning the grand total of all invoices (it should be $1,535,135.96 not $5,475,597.89 as shown below), and the reason is because the measure 'Date-base' is BLANK, so this other measure ends up picking up all invoices since their due dates are all on or after a blank date:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Conversely, when I setup another measure that is supposed to calculate the total of invoices whose due dates are &lt;U&gt;before&lt;/U&gt; the selected date, this measure also returns BLANK, instead of the correct total amount of $3,940,461.93, since this measure can't find any due date that is prior to a blank base-date:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;QUESTION:&lt;/U&gt; I know this is a basic stupid issue, but I just can't seem to figure out a way to fix this, even after having watched several videos about the SELECTEDVALUE function. What am I doing wrong here?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Leonardo&lt;/P&gt;</description>
    <pubDate>Fri, 01 Aug 2025 16:17:34 GMT</pubDate>
    <dc:creator>leolapa_br</dc:creator>
    <dc:date>2025-08-01T16:17:34Z</dc:date>
    <item>
      <title>SELECTEDVALUE measure from slicer keeps returning blank value when used on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-measure-from-slicer-keeps-returning-blank-value/m-p/4784667#M183208</link>
      <description>&lt;P&gt;So I have this simple dropdown slicer which is a list containing only a couple of dates, which in turn comes from a single-column table currently with NO relationship to either the date and the fact tables (CalData and Contas_a_Pagar respectively) in the semantic model:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Then I created the following measure that picks up whatever choice I made on the aforementioned slicer:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Data-base = SELECTEDVALUE(Data_Base_Lista[Data-base])&lt;/LI-CODE&gt;&lt;P&gt;And when I drop this measure on a card visual it works just fine, so the measure is in fact picking up my date slicer choice:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#800000"&gt;&lt;STRONG&gt;&lt;U&gt;PROBLEM:&lt;/U&gt; However, when I define and evaluate the same measure on DAX query view, it returns BLANK:&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;↓↓↓↓↓↓↓&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The problem is that I'm using this measure as a base date to calculate other measures, for instance to calculate the total of invoices whose due dates are &lt;U&gt;on or after&lt;/U&gt; the selected base-date, and this measure is instead returning the grand total of all invoices (it should be $1,535,135.96 not $5,475,597.89 as shown below), and the reason is because the measure 'Date-base' is BLANK, so this other measure ends up picking up all invoices since their due dates are all on or after a blank date:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Conversely, when I setup another measure that is supposed to calculate the total of invoices whose due dates are &lt;U&gt;before&lt;/U&gt; the selected date, this measure also returns BLANK, instead of the correct total amount of $3,940,461.93, since this measure can't find any due date that is prior to a blank base-date:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;QUESTION:&lt;/U&gt; I know this is a basic stupid issue, but I just can't seem to figure out a way to fix this, even after having watched several videos about the SELECTEDVALUE function. What am I doing wrong here?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Leonardo&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 16:17:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-measure-from-slicer-keeps-returning-blank-value/m-p/4784667#M183208</guid>
      <dc:creator>leolapa_br</dc:creator>
      <dc:date>2025-08-01T16:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE measure from slicer keeps returning blank value when used on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-measure-from-slicer-keeps-returning-blank-value/m-p/4784678#M183209</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;in DAX query view, you do not have the filter you apply in the visualization, so SELECTEDVALUE returns a blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to see the value in the query view, you need to inject the filter like instalead of calling the measure [Data-base] in row 6 or 8 (depending on the images you show) you call&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CALCULATE ( [Data-base], Data_Base_Lista[Data-base] = DATE ( 2025,7,17 ) )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;YOu can also let Power BI do this automatically if you open the performance analyzer, start recording and refresh that visual. You can then copy the query and paste it in the query view.&amp;nbsp; You will see there that Power BI injects the selected value form the visual into the query, typically with a TREATAS table call, then used as a FILTER (DSO_FILTER or something like this)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this helped, please consider giving kudos and mark as a solution&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="273" data-lia-user-login="me" class="lia-mention lia-mention-user"&gt;me&lt;/a&gt; in replies or I'll lose your thread&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Want to check your DAX skills? &lt;A href="https://www.linkedin.com/company/kubisco/" target="_blank"&gt;Answer my biweekly DAX challenges on the kubisco Linkedin page&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Consider voting &lt;A href="https://community.fabric.microsoft.com/t5/Fabric-Ideas/Power-BI-Filter-Pane-as-an-icon-on-the-right-side-bar-in-on/idi-p/4728588" target="_blank"&gt;this Power BI idea&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Francesco Bergamaschi&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;MBA, M.Eng, M.Econ, Professor of BI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Aug 2025 16:26:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-measure-from-slicer-keeps-returning-blank-value/m-p/4784678#M183209</guid>
      <dc:creator>FBergamaschi</dc:creator>
      <dc:date>2025-08-01T16:26:08Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE measure from slicer keeps returning blank value when used on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-measure-from-slicer-keeps-returning-blank-value/m-p/4785773#M183236</link>
      <description>&lt;P&gt;DAX Query view is not aware of your filter context, you have to tell it all the filters you want to use, ideally via TREATAS.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Aug 2025 20:22:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-measure-from-slicer-keeps-returning-blank-value/m-p/4785773#M183236</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-08-03T20:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: SELECTEDVALUE measure from slicer keeps returning blank value when used on another measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-measure-from-slicer-keeps-returning-blank-value/m-p/4786834#M183275</link>
      <description>&lt;P&gt;Understood. I initially thought the DAX query editor would pick up whatever slicer choice I have on the report, but I realized that can't be done since there could be several unsynced slicers tied to the same field and placed on several different reports under the same .pbi file, which would make it impossible for the DAX query editor to choose which slicer to grab the value from.&lt;/P&gt;&lt;P&gt;Thanks for taking the time to clarify that!&lt;/P&gt;</description>
      <pubDate>Mon, 04 Aug 2025 14:11:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SELECTEDVALUE-measure-from-slicer-keeps-returning-blank-value/m-p/4786834#M183275</guid>
      <dc:creator>leolapa_br</dc:creator>
      <dc:date>2025-08-04T14:11:04Z</dc:date>
    </item>
  </channel>
</rss>

