<?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 syntax for ')' is incorrect. in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034496#M103837</link>
    <description>&lt;P&gt;Hi GQ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try returning the variable you have created?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TestReq =&amp;nbsp;&lt;/P&gt;&lt;P&gt;var CHAG = RELATEDTABLE(CHAGAS)&lt;/P&gt;&lt;P&gt;RETURN CHAG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can define a variable in any DAX expression by using&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;VAR followed by RETURN&lt;/STRONG&gt;&lt;SPAN&gt;. In one or several VAR sections, you individually declare the variables needed to compute the expression; in the RETURN part you provide the expression itself (Source: &lt;A href="https://www.sqlbi.com/articles/variables-in-dax/" target="_self"&gt;SQLPBI&lt;/A&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you have any questions.&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution&lt;/STRONG&gt;, and &lt;STRONG&gt;Kudos&lt;/STRONG&gt; &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; are very much appreciated!&lt;/P&gt;&lt;P&gt;- YJ&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jan 2023 16:53:11 GMT</pubDate>
    <dc:creator>unicorns</dc:creator>
    <dc:date>2023-01-20T16:53:11Z</dc:date>
    <item>
      <title>The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034473#M103835</link>
      <description>&lt;P&gt;I've searched for this and the typical suggestion is that the Return is needed.&amp;nbsp; I'm using this in a new column, does it need to be a measure?&amp;nbsp; What is the issue?&amp;nbsp; I need to have a few of these but figured I'd get one right first.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 16:27:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034473#M103835</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T16:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034495#M103836</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp; Return funtion consumes variables.&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TestReq = 

var Chag = Relatedtable(CHAGAS)

Return 
Chag&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This solution might help you to understand better&amp;nbsp;&lt;A href="http://link" target="_blank" rel="noopener"&gt;https://community.powerbi.com/t5/Desktop/How-DAX-Execute-VAR-RETURN/m-p/654960&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 16:38:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034495#M103836</guid>
      <dc:creator>AnthonyJoseph</dc:creator>
      <dc:date>2023-01-20T16:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034496#M103837</link>
      <description>&lt;P&gt;Hi GQ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you try returning the variable you have created?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TestReq =&amp;nbsp;&lt;/P&gt;&lt;P&gt;var CHAG = RELATEDTABLE(CHAGAS)&lt;/P&gt;&lt;P&gt;RETURN CHAG&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can define a variable in any DAX expression by using&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;VAR followed by RETURN&lt;/STRONG&gt;&lt;SPAN&gt;. In one or several VAR sections, you individually declare the variables needed to compute the expression; in the RETURN part you provide the expression itself (Source: &lt;A href="https://www.sqlbi.com/articles/variables-in-dax/" target="_self"&gt;SQLPBI&lt;/A&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if you have any questions.&lt;/P&gt;&lt;P&gt;If this solves your issues, please mark it as the &lt;STRONG&gt;solution&lt;/STRONG&gt;, and &lt;STRONG&gt;Kudos&lt;/STRONG&gt; &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; are very much appreciated!&lt;/P&gt;&lt;P&gt;- YJ&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 16:53:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034496#M103837</guid>
      <dc:creator>unicorns</dc:creator>
      <dc:date>2023-01-20T16:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034515#M103840</link>
      <description>&lt;P&gt;I got a new error.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;@AnthonyJoseph - the link did not work&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="502192" data-lia-user-login="unicorns" class="lia-mention lia-mention-user"&gt;unicorns&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 16:47:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034515#M103840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T16:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034523#M103842</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="86868" data-lia-user-login="AnthonyJoseph" class="lia-mention lia-mention-user"&gt;AnthonyJoseph&lt;/a&gt;&amp;nbsp; - I got it to work from the email I received.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 16:50:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034523#M103842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T16:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034549#M103844</link>
      <description>&lt;P&gt;Hi GQ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just read your post again and if you are trying to use this in a 'new column' then it should be a measure. I think that formula is returning an entire table, which you can't use for a column since it's returning multiple columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you should assign your code to a&amp;nbsp;&lt;STRONG&gt;measure&amp;nbsp;&lt;/STRONG&gt;in this case. I think you can use filters+aggregate functions in your code to ensure you are returning a measure instead of entire table. let me know if I can help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 17:01:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034549#M103844</guid>
      <dc:creator>unicorns</dc:creator>
      <dc:date>2023-01-20T17:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034615#M103848</link>
      <description>&lt;P&gt;I'm getting the same error as a measure.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 17:38:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034615#M103848</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T17:38:38Z</dc:date>
    </item>
    <item>
      <title>Re: The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034629#M103849</link>
      <description>&lt;P&gt;Are you able to share a pbi file or information/logic on what kind of measure you are trying to create for that new column?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 17:46:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034629#M103849</guid>
      <dc:creator>unicorns</dc:creator>
      <dc:date>2023-01-20T17:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034636#M103850</link>
      <description>&lt;P&gt;I created another post yesterday, I think, that may help you understand where I'm going.&amp;nbsp; It said (with notations added now):&lt;/P&gt;&lt;P&gt;I need to have a result column in my report be a concatenation of text and conditionally, 1 or 2 addtional text 'values'.&lt;/P&gt;&lt;P&gt;Donor+xxxx - in every row&lt;BR /&gt;conditionally, if donor # from table 1 matches a donor # from table 2, I need to concatenate "+yyy" - this would be CHAG&lt;BR /&gt;Further, if the State in another table = a certain value, additional concatenate "+zzz'&amp;nbsp; This, I was hoping would be another var situation.&lt;/P&gt;&lt;P&gt;Both the yyy &amp;amp; zzz are optional&lt;/P&gt;&lt;P&gt;End results could be any of:&lt;BR /&gt;Donor+xxxx&lt;BR /&gt;Donor+xxxx+yyy&lt;BR /&gt;Donor+xxxx+zzz&lt;BR /&gt;Donor+xxxx+yyy+zzz&lt;/P&gt;&lt;P&gt;yyy and zzz are not present in any table, just text values to concatenate.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 17:52:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034636#M103850</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T17:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034681#M103853</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which column from that table would you like to return? What is the relationship between the two tables?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 18:20:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034681#M103853</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-20T18:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034682#M103854</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which column from that table would you like to return? What is the relationship between the two tables?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 18:20:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034682#M103854</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-01-20T18:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: The syntax for ')' is incorrect.</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034733#M103857</link>
      <description>&lt;P&gt;I want to return the 1st column which is a member number.&amp;nbsp; It is unique and it linked to another table by that number.&amp;nbsp; Essentially, if the member is not in that table, I need to concatenate another literal to a message column.&amp;nbsp; (see my reply to unicorn in this thread with my needed logic.)&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jan 2023 18:55:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-syntax-for-is-incorrect/m-p/3034733#M103857</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-01-20T18:55:24Z</dc:date>
    </item>
  </channel>
</rss>

