<?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 and Dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SelectedValue-and-Dates/m-p/3742137#M145944</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to make a report that shows the stock size, prize and total value of different items. I need to tell the total value using different approaches: Value when bought, Value of the average last 6 months selling price, Value on the last selling price. And I need to use a slicer to change the date I'm checking.&lt;/P&gt;&lt;P&gt;When I'm using this measure, it can show the current value on last selling price on febr 29:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Last Selling Value =&lt;/SPAN&gt; &lt;SPAN&gt;calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUMX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUMMARIZE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Invoice&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Product&lt;/SPAN&gt;&lt;SPAN&gt;[Name]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;Depot&lt;/SPAN&gt;&lt;SPAN&gt;[Name]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;[Last Selling Price]&lt;/SPAN&gt;&lt;SPAN&gt;*&lt;/SPAN&gt;&lt;SPAN&gt;Calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SUM&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Depot&lt;/SPAN&gt;&lt;SPAN&gt;[Ammount]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt;DATE(2024,02,29&lt;/SPAN&gt;&lt;SPAN&gt;)),&lt;/SPAN&gt;&lt;SPAN&gt;All&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But when I'm trying to change the DATE(2024,02,29) to SELECTEDVALUE('Date'[Date]) it shows BLANk. On the slicer I can choose only a value, not multiple.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;I have tried to rewrite the measure using MIN, MAX, LASTDATE but I had no success yet. What can I do?&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 05 Mar 2024 08:00:00 GMT</pubDate>
    <dc:creator>Adam15</dc:creator>
    <dc:date>2024-03-05T08:00:00Z</dc:date>
    <item>
      <title>SelectedValue and Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SelectedValue-and-Dates/m-p/3742137#M145944</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to make a report that shows the stock size, prize and total value of different items. I need to tell the total value using different approaches: Value when bought, Value of the average last 6 months selling price, Value on the last selling price. And I need to use a slicer to change the date I'm checking.&lt;/P&gt;&lt;P&gt;When I'm using this measure, it can show the current value on last selling price on febr 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lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;But when I'm trying to change the DATE(2024,02,29) to SELECTEDVALUE('Date'[Date]) it shows BLANk. On the slicer I can choose only a value, not multiple.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;I have tried to rewrite the measure using MIN, MAX, LASTDATE but I had no success yet. What can I do?&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Mar 2024 08:00:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SelectedValue-and-Dates/m-p/3742137#M145944</guid>
      <dc:creator>Adam15</dc:creator>
      <dc:date>2024-03-05T08:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: SelectedValue and Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SelectedValue-and-Dates/m-p/3742210#M145948</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="700106" data-lia-user-login="Adam15" class="lia-mention lia-mention-user"&gt;Adam15&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;based on the information you gave, here is some advise:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Make sure you are using the exact same Date field in your slicer as you use for SELECTEDVALUE&lt;/LI&gt;&lt;LI&gt;Make sure the relationship between your date table and the fact table is set up correctly (maybe share here)&lt;/LI&gt;&lt;LI&gt;Also it is important how you set up the Last Selling Price measure (maybe you could share this one's DAX as well here)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hope this helped you in some way already&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 08:25:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SelectedValue-and-Dates/m-p/3742210#M145948</guid>
      <dc:creator>timalbers</dc:creator>
      <dc:date>2024-03-05T08:25:44Z</dc:date>
    </item>
    <item>
      <title>Re: SelectedValue and Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SelectedValue-and-Dates/m-p/3742471#M145957</link>
      <description>&lt;P&gt;The first two is good, I can't really show picture, because the tables are on my native language, I just translated the columns when I asked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the measure for the last selling price:&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Last Selling Price =&lt;/SPAN&gt; &lt;SPAN&gt;Calculate&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Invoice&lt;/SPAN&gt;&lt;SPAN&gt;[Price]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;all&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I work in an industry where the last selling price is equal to the maximum.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 05 Mar 2024 09:38:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SelectedValue-and-Dates/m-p/3742471#M145957</guid>
      <dc:creator>Adam15</dc:creator>
      <dc:date>2024-03-05T09:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: SelectedValue and Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SelectedValue-and-Dates/m-p/3742702#M145968</link>
      <description>&lt;P&gt;Could you just leave out the&amp;nbsp;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;) of the "Last Selling Value" measure.&lt;BR /&gt;This is an explicit filter context which prevents the slicer filter from filtering your dates.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 10:46:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SelectedValue-and-Dates/m-p/3742702#M145968</guid>
      <dc:creator>timalbers</dc:creator>
      <dc:date>2024-03-05T10:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: SelectedValue and Dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SelectedValue-and-Dates/m-p/3742822#M145971</link>
      <description>&lt;P&gt;It works for every product we sold that day, but&amp;nbsp; for those we haven't it gives blank back.&lt;/P&gt;&lt;P&gt;edit: I got it, I just had to replace the Invoice to Depot in the Summarize.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 13:33:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SelectedValue-and-Dates/m-p/3742822#M145971</guid>
      <dc:creator>Adam15</dc:creator>
      <dc:date>2024-03-05T13:33:53Z</dc:date>
    </item>
  </channel>
</rss>

