<?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 by adding conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683210#M179366</link>
    <description>&lt;P&gt;Thank you, it worked!&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 May 2025 12:35:58 GMT</pubDate>
    <dc:creator>Trodo7377</dc:creator>
    <dc:date>2025-05-07T12:35:58Z</dc:date>
    <item>
      <title>Syntax error by adding conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683141#M179361</link>
      <description>&lt;P&gt;I'm using this measure in PBI desktop which works fine:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;m_lan= sumx(values('vAbc'[ProjectID]),calculate(DISTINCTCOUNT('vAbc'[ID])))))&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;But I need to add two conditions and tried to change m_lan as below but getting this error:&amp;nbsp;The following syntax error occurred during parsing: Invalid token, Line 3, Offset 3, &amp;nbsp;.&lt;BR /&gt;New measure(with line number):&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;1 m_lan = 
2 var lan =CALCULATE(
3        DISTINCTCOUNT('vAbc'[ID]),
4        FILTER('vAbc',
5            'vAbc'[col1] &amp;lt;&amp;gt; "Hello" &amp;amp;&amp;amp;
6            NOT(ISBLANK('vAbc'[col1]))
7        )
8    )
9
10 return SUMX(VALUES('vAbc'[ProjectID]), lan)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried to rewrite the measure in many ways but still getting error or wrong result. How can I add those conditions to the original measure? or why I getting this error?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 11:42:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683141#M179361</guid>
      <dc:creator>Trodo7377</dc:creator>
      <dc:date>2025-05-07T11:42:35Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error by adding conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683173#M179362</link>
      <description>&lt;P&gt;m_lan =&amp;nbsp;&lt;/P&gt;&lt;P&gt;SUMX(&lt;/P&gt;&lt;P&gt;VALUES('vAbc'[ProjectID]),&lt;/P&gt;&lt;P&gt;CALCULATE(&lt;/P&gt;&lt;P&gt;DISTINCTCOUNT('vAbc'[ID]),&lt;/P&gt;&lt;P&gt;FILTER(&lt;/P&gt;&lt;P&gt;All('vAbc'[col1]),&lt;/P&gt;&lt;P&gt;'vAbc'[col1] &amp;lt;&amp;gt; "Hello" &amp;amp;&amp;amp;&lt;/P&gt;&lt;P&gt;NOT iSBLANK( 'vAbc'[col1] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;)&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 12:14:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683173#M179362</guid>
      <dc:creator>Deku</dc:creator>
      <dc:date>2025-05-07T12:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error by adding conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683181#M179363</link>
      <description>&lt;P&gt;Have you tried something like this?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;m_lan= CALCULATE(
   sumx(values('vAbc'[ProjectID]),calculate(DISTINCTCOUNT('vAbc'[ID])))
   ,'vAbc'[col1] &amp;lt;&amp;gt; "Hello"
   ,NOT(ISBLANK('vAbc'[col1]))
)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 07 May 2025 12:17:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683181#M179363</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2025-05-07T12:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error by adding conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683197#M179364</link>
      <description>&lt;P&gt;Thank you for your suggestion. I changed measure but it shows the same value for all rows.&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 12:30:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683197#M179364</guid>
      <dc:creator>Trodo7377</dc:creator>
      <dc:date>2025-05-07T12:30:13Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error by adding conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683207#M179365</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="790817" data-lia-user-login="Trodo7377" class="lia-mention lia-mention-user"&gt;Trodo7377&lt;/a&gt;&amp;nbsp;Try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;m_lan =&lt;BR /&gt;SUMX(&lt;BR /&gt;VALUES('vAbc'[ProjectID]),&lt;BR /&gt;CALCULATE(&lt;BR /&gt;DISTINCTCOUNT('vAbc'[ID]),&lt;BR /&gt;'vAbc'[col1] &amp;lt;&amp;gt; "Hello",&lt;BR /&gt;NOT(ISBLANK('vAbc'[col1]))&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a little different&lt;/P&gt;
&lt;P&gt;BBF&lt;/P&gt;
&lt;DIV style="font-family: Segoe UI, sans-serif; font-size: 14px; line-height: 1.2;"&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":light_bulb:"&gt;💡&lt;/span&gt; &lt;STRONG&gt;Did I answer your question?&lt;/STRONG&gt; Mark my post as a solution! &lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; Kudos are appreciated &lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":fire:"&gt;🔥&lt;/span&gt; Proud to be a Super User!&lt;/STRONG&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;img /&gt; &lt;/DIV&gt;</description>
      <pubDate>Wed, 07 May 2025 12:34:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683207#M179365</guid>
      <dc:creator>BeaBF</dc:creator>
      <dc:date>2025-05-07T12:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error by adding conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683210#M179366</link>
      <description>&lt;P&gt;Thank you, it worked!&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 12:35:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683210#M179366</guid>
      <dc:creator>Trodo7377</dc:creator>
      <dc:date>2025-05-07T12:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Syntax error by adding conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683259#M179369</link>
      <description>&lt;P&gt;yes. was wondering what the sumx was for. But you might have to share more on the data you have and the output you are trying to achieve here.&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 13:16:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Syntax-error-by-adding-conditions/m-p/4683259#M179369</guid>
      <dc:creator>sjoerdvn</dc:creator>
      <dc:date>2025-05-07T13:16:31Z</dc:date>
    </item>
  </channel>
</rss>

