<?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: The MAX function only accepts a column reference as an argument in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-MAX-function-only-accepts-a-column-reference-as-an-argument/m-p/2229330#M53163</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You don't need to use MAX in your dormula, remove Max and just type your Variable names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;_MeqY2 =
VAR adddays =
    DAY ( TODAY () ) + [_SelectedMonthYear]
VAR last5 =
    DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 5, 1 )
RETURN
    IF (
        'Usage Tracking'[USAGE_DATE] &amp;lt;= adddays
            &amp;amp;&amp;amp; 'Usage Tracking'[USAGE_DATE] &amp;gt;= last5,
        1,
        0
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank" rel="noopener"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 09 Dec 2021 04:43:46 GMT</pubDate>
    <dc:creator>VahidDM</dc:creator>
    <dc:date>2021-12-09T04:43:46Z</dc:date>
    <item>
      <title>The MAX function only accepts a column reference as an argument</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-MAX-function-only-accepts-a-column-reference-as-an-argument/m-p/2228109#M53123</link>
      <description>&lt;P&gt;&lt;STRONG&gt;While creating calcualted column:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;could youplease help me how to use max for single values.... max accepts only column instead of value&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_MeqY2 = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;// then If(([USAGE_DATE]&amp;lt;=Max(DateAdd("dd",Day(DateTimeNow()),[SelectedMonthYear]))) and ([USAGE_DATE]&amp;gt;=Max(DateAdd("mm",-5,DateTimeNow()))),"Y","N")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;var adddays = DAY(TODAY()) + [_SelectedMonthYear]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;var last5 = DATE(YEAR(TODAY()), MONTH(TODAY())-5,1)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;return&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;IF( 'Usage Tracking'[USAGE_DATE] &amp;lt;= MAX(adddays) &amp;amp;&amp;amp; 'Usage Tracking'[USAGE_DATE] &amp;gt;= MAX(last5),1,0)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN&gt;// DateAdd("dd",Day(DateTimeNow()),[SelectedMonthYear]))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;-==================&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;while creating measure&lt;/STRONG&gt; : usagedate is not accepting&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 15:50:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-MAX-function-only-accepts-a-column-reference-as-an-argument/m-p/2228109#M53123</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-08T15:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: The MAX function only accepts a column reference as an argument</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-MAX-function-only-accepts-a-column-reference-as-an-argument/m-p/2228133#M53125</link>
      <description>&lt;P&gt;&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; or&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315278" data-lia-user-login="VahidDM" class="lia-mention lia-mention-user"&gt;VahidDM&lt;/a&gt;&amp;nbsp; could you please help me on this code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Dec 2021 15:42:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-MAX-function-only-accepts-a-column-reference-as-an-argument/m-p/2228133#M53125</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-08T15:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: The MAX function only accepts a column reference as an argument</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-MAX-function-only-accepts-a-column-reference-as-an-argument/m-p/2229330#M53163</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You don't need to use MAX in your dormula, remove Max and just type your Variable names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;_MeqY2 =
VAR adddays =
    DAY ( TODAY () ) + [_SelectedMonthYear]
VAR last5 =
    DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - 5, 1 )
RETURN
    IF (
        'Usage Tracking'[USAGE_DATE] &amp;lt;= adddays
            &amp;amp;&amp;amp; 'Usage Tracking'[USAGE_DATE] &amp;gt;= last5,
        1,
        0
    )&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;SPAN&gt;helps&lt;/SPAN&gt;&lt;/STRONG&gt;, please consider&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;accepting&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;it as the solution&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/EM&gt;to help the other members find it more quickly.&lt;BR /&gt;&lt;STRONG&gt;&lt;SPAN&gt;Appreciate your Kudos!!&lt;BR /&gt;&lt;STRONG&gt;LinkedIn:&amp;nbsp;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&lt;A href="https://www.linkedin.com/in/vahid-dm/" target="_blank" rel="noopener"&gt;www.linkedin.com/in/vahid-dm/&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 04:43:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-MAX-function-only-accepts-a-column-reference-as-an-argument/m-p/2229330#M53163</guid>
      <dc:creator>VahidDM</dc:creator>
      <dc:date>2021-12-09T04:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: The MAX function only accepts a column reference as an argument</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-MAX-function-only-accepts-a-column-reference-as-an-argument/m-p/2229381#M53164</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="315278" data-lia-user-login="VahidDM" class="lia-mention lia-mention-user"&gt;VahidDM&lt;/a&gt;&amp;nbsp; you are right, but if i want to find the MAX variables days and&amp;nbsp; last 6 months, then how to do it? im using max as per migration project code....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using this calculated column i have write another final calculation based on&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;_MeqY2 cals&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you are solution works superb...&lt;/P&gt;</description>
      <pubDate>Thu, 09 Dec 2021 05:37:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-MAX-function-only-accepts-a-column-reference-as-an-argument/m-p/2229381#M53164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-09T05:37:37Z</dc:date>
    </item>
  </channel>
</rss>

