<?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: DAX measure error date is incompatible with int. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226660#M118199</link>
    <description>&lt;P&gt;Results in the following error:&amp;nbsp;Invalid Numeric Representation of a Date Value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 May 2023 09:56:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-09T09:56:00Z</dc:date>
    <item>
      <title>DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226521#M118191</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;Im trying to configure the functionality where based on a selection of a month in the filter, the visual shows the previous 12 months going back from the selected month. I wrote a DAX measure to use in the visual but when using it I get the error that date is incompatible with int.&lt;BR /&gt;&lt;BR /&gt;I think it has to do with the variables used but cant figure out what it exactely is. The measure used is:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;12 Months back = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;CurrentDate&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'dim_Date'&lt;/SPAN&gt;&lt;SPAN&gt;[EOM Date]&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ate&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;BR /&gt;&lt;BR /&gt;Any help is welcome. Thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 09 May 2023 09:03:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226521#M118191</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-09T09:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226635#M118197</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;12 Months back =
VAR CurrentDate =
    SELECTEDVALUE ( 'dim_Date'[EOM Date], MAX ( 'dim_Date'[EOM Date] ) )
VAR Result =
    CALCULATE (
        SUM ( 'fact'[column] ),
        DATESINPERIOD ( 'Date'[Date], CurrentDate, -12, MONTH )
    )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 09 May 2023 09:42:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226635#M118197</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-05-09T09:42:36Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226660#M118199</link>
      <description>&lt;P&gt;Results in the following error:&amp;nbsp;Invalid Numeric Representation of a Date Value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 09:56:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226660#M118199</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-09T09:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226676#M118200</link>
      <description>&lt;P&gt;Try changing it to return the CurrentDate variable and see what that shows.&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 10:03:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226676#M118200</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-05-09T10:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226700#M118203</link>
      <description>&lt;P&gt;That returns the date time of the selected date in the filter (based on 'dim_Date'[EOM Date])&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 10:16:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226700#M118203</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-09T10:16:16Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226708#M118205</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;12 Months back =
VAR CurrentDateTime =
    SELECTEDVALUE ( 'dim_Date'[EOM Date], MAX ( 'dim_Date'[EOM Date] ) )
VAR CurrentDate =
    DATE ( YEAR ( CurrentDateTime ), MONTH ( CurrentDateTime ), DAY ( CurrentDateTime ) )
VAR Result =
    CALCULATE (
        SUM ( 'fact'[column] ),
        DATESINPERIOD ( 'Date'[Date], CurrentDate, -12, MONTH )
    )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 09 May 2023 10:20:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226708#M118205</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-05-09T10:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226743#M118206</link>
      <description>&lt;P&gt;The error is gone an the measure shows data in the visual but it's still just one point in time, corresponding with the selection in the filter. It doesn't show the previous 12 months going back from that selected date as I expected it to do..&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 10:37:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226743#M118206</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-09T10:37:49Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226751#M118207</link>
      <description>&lt;P&gt;Hopefully this will do it&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;12 Months back =
VAR CurrentDateTime =
    SELECTEDVALUE ( 'dim_Date'[EOM Date], MAX ( 'dim_Date'[EOM Date] ) )
VAR CurrentDate =
    DATE ( YEAR ( CurrentDateTime ), MONTH ( CurrentDateTime ), DAY ( CurrentDateTime ) )
VAR PreviousDate =
    DATE ( YEAR ( CurrentDateTime ) - 1, MONTH ( CurrentDateTime ), DAY ( CurrentDateTime ) )
VAR Result =
    CALCULATE (
        SUM ( 'fact'[column] ),
        DATESBETWEEN ( 'Date'[Date], PreviousDate, CurrentDate )
    )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 09 May 2023 10:41:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226751#M118207</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-05-09T10:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226772#M118209</link>
      <description>&lt;P&gt;Nope still the same&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 10:54:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226772#M118209</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-09T10:54:24Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226781#M118210</link>
      <description>&lt;P&gt;Is the date table marked as a date table?&lt;/P&gt;
&lt;P&gt;Do any other tables filter the date table ?&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 11:05:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3226781#M118210</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-05-09T11:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3227004#M118223</link>
      <description>&lt;P&gt;The date table is marked as a date table and ther arent any other tables that filter the date table. However the datetable is related to the fact based on a numeric datekey and not an actual date, could that be the issue?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 12:40:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3227004#M118223</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-09T12:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3227041#M118225</link>
      <description>&lt;P&gt;That shouldn't make any difference. Try adding REMOVEFILTERS('Date') to the CALCULATE statement.&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 12:56:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3227041#M118225</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2023-05-09T12:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: DAX measure error date is incompatible with int.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3227302#M118232</link>
      <description>&lt;P&gt;Nope, still not. It looks as if the slicer selection somehow overrules the values shown in the visual based upon the measure. I have to dig a little further into this.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help anyway, appreciate it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 14:45:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-measure-error-date-is-incompatible-with-int/m-p/3227302#M118232</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-09T14:45:54Z</dc:date>
    </item>
  </channel>
</rss>

