<?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: How to Use a What If Date Parameter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Use-a-What-If-Date-Parameter/m-p/3048162#M104880</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="505824" data-lia-user-login="daniel_epc" class="lia-mention lia-mention-user"&gt;daniel_epc&lt;/a&gt; , I am assuming the date parameter table is not joined to another table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get min/ max date like this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//Date1 is an independent Date table and Date is Joined &lt;BR /&gt;new measure =&lt;BR /&gt;var _max = maxx(allselected(Date1),Date1[Date])&lt;BR /&gt;var _min = minx(allselected(Date1),Date1[Date]) &lt;BR /&gt;return&lt;/P&gt;
&lt;P&gt;Averagex(Table, Datediff(Table[Date], _max, Day)&lt;/P&gt;</description>
    <pubDate>Sat, 28 Jan 2023 02:40:09 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2023-01-28T02:40:09Z</dc:date>
    <item>
      <title>How to Use a What If Date Parameter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Use-a-What-If-Date-Parameter/m-p/3047845#M104844</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe it is a silly question, but I am not able to use a What If Date parameter in a DAX Measure, what I need is to calculate the days between the date parameter and another date field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;The parameter shows up correctly if I put it directly on the table, but when I try to access its value via DAX it retrieves the Minimum Date of the parameter range, the function SELECTEDVALUE doesn't retrieve any value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 19:28:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Use-a-What-If-Date-Parameter/m-p/3047845#M104844</guid>
      <dc:creator>daniel_epc</dc:creator>
      <dc:date>2023-01-27T19:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use a What If Date Parameter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Use-a-What-If-Date-Parameter/m-p/3048162#M104880</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="505824" data-lia-user-login="daniel_epc" class="lia-mention lia-mention-user"&gt;daniel_epc&lt;/a&gt; , I am assuming the date parameter table is not joined to another table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can get min/ max date like this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;//Date1 is an independent Date table and Date is Joined &lt;BR /&gt;new measure =&lt;BR /&gt;var _max = maxx(allselected(Date1),Date1[Date])&lt;BR /&gt;var _min = minx(allselected(Date1),Date1[Date]) &lt;BR /&gt;return&lt;/P&gt;
&lt;P&gt;Averagex(Table, Datediff(Table[Date], _max, Day)&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2023 02:40:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Use-a-What-If-Date-Parameter/m-p/3048162#M104880</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2023-01-28T02:40:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use a What If Date Parameter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Use-a-What-If-Date-Parameter/m-p/3048476#M104909</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;, but it is still not working, the parameter and the dax measure have the same code but the last one doesn't evaluate as desired.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Parametro Fecha Value = &lt;/SPAN&gt;&lt;SPAN&gt;MINX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Parametro Fecha'&lt;/SPAN&gt;&lt;SPAN&gt;[Parametro Fecha]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Parametro Fecha'&lt;/SPAN&gt;&lt;SPAN&gt;[Parametro Fecha]&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;DiasEnInventario = &lt;/SPAN&gt;&lt;SPAN&gt;MINX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Parametro Fecha'&lt;/SPAN&gt;&lt;SPAN&gt;[Parametro Fecha]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Parametro Fecha'&lt;/SPAN&gt;&lt;SPAN&gt;[Parametro Fecha]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me to understand what am I missing?&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2023 18:40:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Use-a-What-If-Date-Parameter/m-p/3048476#M104909</guid>
      <dc:creator>daniel_epc</dc:creator>
      <dc:date>2023-01-28T18:40:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to Use a What If Date Parameter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Use-a-What-If-Date-Parameter/m-p/3049037#M104943</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;, but I still couldn't get it to work, the parameter and the dax measure have the same code but the last one doesn't evaluate as desired.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Parametro Fecha Value =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MINX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Parametro Fecha'&lt;/SPAN&gt;&lt;SPAN&gt;[Parametro Fecha]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Parametro Fecha'&lt;/SPAN&gt;&lt;SPAN&gt;[Parametro Fecha]&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;DiasEnInventario =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MINX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALLSELECTED&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Parametro Fecha'&lt;/SPAN&gt;&lt;SPAN&gt;[Parametro Fecha]&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Parametro Fecha'&lt;/SPAN&gt;&lt;SPAN&gt;[Parametro Fecha]&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;The date parameter is not joined to any table, should it be?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 29 Jan 2023 17:49:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-Use-a-What-If-Date-Parameter/m-p/3049037#M104943</guid>
      <dc:creator>daniel_epc</dc:creator>
      <dc:date>2023-01-29T17:49:47Z</dc:date>
    </item>
  </channel>
</rss>

