<?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: Function DAX To parameter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Function-DAX-To-parameter/m-p/2468224#M67112</link>
    <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="379921" data-lia-user-login="spmivilsoftbi" class="lia-mention lia-mention-user"&gt;spmivilsoftbi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I know how you want to bind these function to your parameters? What kind of parameters do you want to bind?&lt;/P&gt;
&lt;P&gt;If you define your parameter by New Parameter feature, you could directly use it to do calculation. If your parameter is defined in Power Query Editor(Transform data), you could load it to your model and use it to some calculations in your formula or take it to make a visual just like other fields.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And normally, if you would like to take your parameter value into your formula, you could use SELECTEDVALUE/MAX/MIN in measure or directly use the field name of the parameter in Calculated column. So you could make a little bit change to your formulas like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date_Init = CALCULATE(MIN(filters_1[Date]), FILTER( ALLSELECTED(filters_1),'filters_1'[column name]=SELECTEDVALUE(Your parameter name)))

Date_End = CALCULATE(MAX(filters_1[Date]), FILTER( ALLSELECTED(filters_1), 'filters_1'[column name]=SELECTEDVALUE(Your parameter name)))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the official document about these funcitons.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/selectedvalue-function" target="_blank" rel="noopener"&gt;SELECTEDVALUE function - DAX | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/min-function-dax" target="_blank" rel="noopener"&gt;MIN function (DAX) - DAX | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/max-function-dax" target="_blank" rel="noopener"&gt;MAX function (DAX) - DAX | Microsoft Docs&lt;/A&gt; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider&lt;STRONG&gt; Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _ Caiyun&lt;/P&gt;</description>
    <pubDate>Mon, 25 Apr 2022 01:11:55 GMT</pubDate>
    <dc:creator>v-cazheng-msft</dc:creator>
    <dc:date>2022-04-25T01:11:55Z</dc:date>
    <item>
      <title>Function DAX To parameter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Function-DAX-To-parameter/m-p/2462202#M66708</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I have a DAX function that returns the minimum and maximum date of a list of dates&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Date_Init = CALCULATE(MIN(filters_1[Date]), ALLSELECTED(filters_1))
Date_End = CALCULATE(MAX(filters_1[Date]), ALLSELECTED(filters_1))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when I want to bind a parameter to those functions, the Power Bi app doesn't give me the option to do so.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;Is there a way to bind those DAX functions to parameters? Is there another way to do it?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2022 20:58:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Function-DAX-To-parameter/m-p/2462202#M66708</guid>
      <dc:creator>spmivilsoftbi</dc:creator>
      <dc:date>2022-04-18T20:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Function DAX To parameter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Function-DAX-To-parameter/m-p/2462378#M66718</link>
      <description>&lt;P&gt;You cannot use DAX measures as Power Query parameters. You could determine the values in PQ and use them in a different table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = filters_1,
    MinValue = Table.Min(Source,"Date"),
    Result = MinValue[Date]
in
    Result&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/powerquery-m/table-min" target="_blank" rel="noopener"&gt;Table.Min - PowerQuery M | Microsoft Docs&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/powerquery-m/table-max" target="_blank" rel="noopener"&gt;Table.Max - PowerQuery M | Microsoft Docs&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Apr 2022 13:10:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Function-DAX-To-parameter/m-p/2462378#M66718</guid>
      <dc:creator>karnold</dc:creator>
      <dc:date>2022-04-21T13:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Function DAX To parameter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Function-DAX-To-parameter/m-p/2468224#M67112</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="379921" data-lia-user-login="spmivilsoftbi" class="lia-mention lia-mention-user"&gt;spmivilsoftbi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;May I know how you want to bind these function to your parameters? What kind of parameters do you want to bind?&lt;/P&gt;
&lt;P&gt;If you define your parameter by New Parameter feature, you could directly use it to do calculation. If your parameter is defined in Power Query Editor(Transform data), you could load it to your model and use it to some calculations in your formula or take it to make a visual just like other fields.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And normally, if you would like to take your parameter value into your formula, you could use SELECTEDVALUE/MAX/MIN in measure or directly use the field name of the parameter in Calculated column. So you could make a little bit change to your formulas like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Date_Init = CALCULATE(MIN(filters_1[Date]), FILTER( ALLSELECTED(filters_1),'filters_1'[column name]=SELECTEDVALUE(Your parameter name)))

Date_End = CALCULATE(MAX(filters_1[Date]), FILTER( ALLSELECTED(filters_1), 'filters_1'[column name]=SELECTEDVALUE(Your parameter name)))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the official document about these funcitons.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/selectedvalue-function" target="_blank" rel="noopener"&gt;SELECTEDVALUE function - DAX | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/min-function-dax" target="_blank" rel="noopener"&gt;MIN function (DAX) - DAX | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/dax/max-function-dax" target="_blank" rel="noopener"&gt;MAX function (DAX) - DAX | Microsoft Docs&lt;/A&gt; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider&lt;STRONG&gt; Accept it as the solution&lt;/STRONG&gt; to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _ Caiyun&lt;/P&gt;</description>
      <pubDate>Mon, 25 Apr 2022 01:11:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Function-DAX-To-parameter/m-p/2468224#M67112</guid>
      <dc:creator>v-cazheng-msft</dc:creator>
      <dc:date>2022-04-25T01:11:55Z</dc:date>
    </item>
  </channel>
</rss>

