<?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: Syntax Error Occurred during Parsing: Invalid Token Line 7 Offset 56 in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2798384#M87995</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can try the following formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Duplicate =
VAR _dCount =
    COUNTROWS (
        FILTER (
            'DB 15092022_1',
            'DB 15092022_1'[STO Number] = EARLIER ( 'DB 15092022_1'[STO Number] )
                &amp;amp;&amp;amp; 'DB 15092022_1'[Index] &amp;lt;= EARLIER ( 'DB 15092022_1'[Index] )
        )
    )
RETURN
    IF ( _dCount &amp;gt; 1, 1, 0 )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a large amount of data, you can try to calculate with measure.&lt;BR /&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Duplicate =
VAR _dCount =
    COUNTROWS (
        FILTER (
            ALL ( 'DB 15092022_1' ),
            'DB 15092022_1'[STO Number] = SELECTEDVALUE ( 'DB 15092022_1'[STO Number] )
                &amp;amp;&amp;amp; 'DB 15092022_1'[Index] &amp;lt;= SELECTEDVALUE ( 'DB 15092022_1'[Index] )
        )
    )
RETURN
    IF ( _dCount &amp;gt; 1, 1, 0 )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Sep 2022 03:05:30 GMT</pubDate>
    <dc:creator>v-zhangti</dc:creator>
    <dc:date>2022-09-27T03:05:30Z</dc:date>
    <item>
      <title>Syntax Error Occurred during Parsing: Invalid Token Line 7 Offset 56</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2795589#M87831</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am getting this error when i using the&amp;nbsp; formula&amp;nbsp; and the find the duplicate values in a same column to return output as 0, 1&lt;BR /&gt;Any Help please?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Duplicate = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;--VAR dCount =&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;COUNTROWS&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'DB 15092022_1'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;'DB 15092022_1'&lt;/SPAN&gt;&lt;SPAN&gt;[STO Number]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt; ( &lt;/SPAN&gt;&lt;SPAN&gt;'DB 15092022_1'&lt;/SPAN&gt;&lt;SPAN&gt;[STO Number]&lt;/SPAN&gt;&lt;SPAN&gt; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;'DB 15092022_1'&lt;/SPAN&gt;&lt;SPAN&gt;[Index]&lt;/SPAN&gt;&lt;SPAN&gt; &amp;lt;= &lt;/SPAN&gt;&lt;SPAN&gt;EARLIER&lt;/SPAN&gt;&lt;SPAN&gt; ( 'DB 15092022_1[Index] )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ))))&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 26 Sep 2022 08:15:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2795589#M87831</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-26T08:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error Occurred during Parsing: Invalid Token Line 7 Offset 56</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2795732#M87843</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Problem with Single quote in table name, Try like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Duplicate =&lt;BR /&gt;--VAR dCount =&lt;BR /&gt;COUNTROWS (&lt;BR /&gt;FILTER (&lt;BR /&gt;'DB 15092022_1',&lt;BR /&gt;'DB 15092022_1'[STO Number] = EARLIER ( 'DB 15092022_1'[STO Number] )&lt;BR /&gt;&amp;amp;&amp;amp; 'DB 15092022_1'[Index] &amp;lt;= EARLIER ( 'DB 15092022_1'[Index] )&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 08:42:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2795732#M87843</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-09-26T08:42:30Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error Occurred during Parsing: Invalid Token Line 7 Offset 56</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2795865#M87854</link>
      <description>&lt;P&gt;Hi Amit,&lt;BR /&gt;&lt;BR /&gt;I have tried the formula as you suggested but it is taking more time to excecute please see the screenshot below&lt;BR /&gt;I am using excel as a source and it has 31k records of Data. Any suggestion please?&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 09:13:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2795865#M87854</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-26T09:13:24Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error Occurred during Parsing: Invalid Token Line 7 Offset 56</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2796076#M87858</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;Any sugesstion please?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 10:24:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2796076#M87858</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-26T10:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error Occurred during Parsing: Invalid Token Line 7 Offset 56</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2798384#M87995</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;You can try the following formula.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Duplicate =
VAR _dCount =
    COUNTROWS (
        FILTER (
            'DB 15092022_1',
            'DB 15092022_1'[STO Number] = EARLIER ( 'DB 15092022_1'[STO Number] )
                &amp;amp;&amp;amp; 'DB 15092022_1'[Index] &amp;lt;= EARLIER ( 'DB 15092022_1'[Index] )
        )
    )
RETURN
    IF ( _dCount &amp;gt; 1, 1, 0 )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a large amount of data, you can try to calculate with measure.&lt;BR /&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Duplicate =
VAR _dCount =
    COUNTROWS (
        FILTER (
            ALL ( 'DB 15092022_1' ),
            'DB 15092022_1'[STO Number] = SELECTEDVALUE ( 'DB 15092022_1'[STO Number] )
                &amp;amp;&amp;amp; 'DB 15092022_1'[Index] &amp;lt;= SELECTEDVALUE ( 'DB 15092022_1'[Index] )
        )
    )
RETURN
    IF ( _dCount &amp;gt; 1, 1, 0 )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 03:05:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2798384#M87995</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2022-09-27T03:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error Occurred during Parsing: Invalid Token Line 7 Offset 56</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2799909#M88069</link>
      <description>&lt;P&gt;Thank you so much for the solution.&lt;BR /&gt;&lt;BR /&gt;By using Measure i got the output&lt;BR /&gt;but one more issue is that from the output i need to take the sum of 0,1&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;i am not able to perform the sum on the measure.&lt;BR /&gt;to calculate SUM i need to use column right. but with measure i am not able to calculate SUM of 0's &amp;amp; 1's&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any suggesstions please?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 27 Sep 2022 13:09:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2799909#M88069</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-27T13:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax Error Occurred during Parsing: Invalid Token Line 7 Offset 56</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2802016#M88192</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;thank you for the solution&lt;BR /&gt;I have tried by using Measure it works, but now from the Output 1, 0's i need to fo sum of the 0's and 1's&lt;BR /&gt;how can i do with the measure?&lt;BR /&gt;because to calcualte the SUM OF 0's and 1's i need to create a column right&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;with the measure output i am unable ot create Sum of 0's and 1's?&lt;BR /&gt;&lt;BR /&gt;Any help?&lt;BR /&gt;&lt;BR /&gt;Duplicate =&lt;BR /&gt;VAR _dCount =&lt;BR /&gt;COUNTROWS (&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'DB 15092022_1' ),&lt;BR /&gt;'DB 15092022_1'[STO Number] = SELECTEDVALUE ( 'DB 15092022_1'[STO Number] )&lt;BR /&gt;&amp;amp;&amp;amp; 'DB 15092022_1'[Index] &amp;lt;= SELECTEDVALUE ( 'DB 15092022_1'[Index] )&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;RETURN&lt;BR /&gt;IF ( _dCount &amp;gt; 1, 1, 0 )&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 07:50:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-Error-Occurred-during-Parsing-Invalid-Token-Line-7-Offset/m-p/2802016#M88192</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-09-28T07:50:59Z</dc:date>
    </item>
  </channel>
</rss>

