<?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 &amp;quot;Invalid expression&amp;quot; error when trying to use If statement with Resident load. in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140035#M9813</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I'm trying to use the following if statement (in italics) to generate the current tariff for a phone company who have a certain tariff for weekends (name begins with WEE) and also have brought in new charges in certain tariffs (but not others) recently.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;The following block of code is what's included when the Qlik Sense loader flags up an error, stating it is an Invalid Expression, but I have used something identical in another loader and it works fine.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Does anyone have any idea why this may not be working?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left join (Current_Table)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load Relationship_ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(left([Agreement Name],3)='WEE', &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Name],-effective_from_date) ,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(len(FirstSortedValue(Distinct [Tariff Name],-applied_from_date))&amp;lt; 1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Name],-effective_from_date),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Name],-applied_from_date))) as "Current Tariff",&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Rates],-applied_from_date) as "Current Tariff Rate",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Rental Charge],-"Date Tariff Apply From") as "Current Rental Charge" &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident Temp_Table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by Relationship_ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks in advance for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Eoin&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 16 Nov 2024 07:53:05 GMT</pubDate>
    <dc:creator>eoinboylan</dc:creator>
    <dc:date>2024-11-16T07:53:05Z</dc:date>
    <item>
      <title>"Invalid expression" error when trying to use If statement with Resident load.</title>
      <link>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140035#M9813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;I'm trying to use the following if statement (in italics) to generate the current tariff for a phone company who have a certain tariff for weekends (name begins with WEE) and also have brought in new charges in certain tariffs (but not others) recently.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;The following block of code is what's included when the Qlik Sense loader flags up an error, stating it is an Invalid Expression, but I have used something identical in another loader and it works fine.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Does anyone have any idea why this may not be working?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Left join (Current_Table)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load Relationship_ID,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(left([Agreement Name],3)='WEE', &lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Name],-effective_from_date) ,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(len(FirstSortedValue(Distinct [Tariff Name],-applied_from_date))&amp;lt; 1,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Name],-effective_from_date),&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Name],-applied_from_date))) as "Current Tariff",&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Rates],-applied_from_date) as "Current Tariff Rate",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Rental Charge],-"Date Tariff Apply From") as "Current Rental Charge" &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident Temp_Table&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by Relationship_ID;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks in advance for your help!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Eoin&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:53:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140035#M9813</guid>
      <dc:creator>eoinboylan</dc:creator>
      <dc:date>2024-11-16T07:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: "Invalid expression" error when trying to use If statement with Resident load.</title>
      <link>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140036#M9814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Either add [Agreement Name] to your group by&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Left join (Current_Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load Relationship_ID,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(left([Agreement Name],3)='WEE',&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Name],-effective_from_date) ,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(len(FirstSortedValue(Distinct [Tariff Name],-applied_from_date))&amp;lt; 1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Name],-effective_from_date),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Name],-applied_from_date))) as "Current Tariff",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Rates],-applied_from_date) as "Current Tariff Rate",&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Distinct [Tariff Rental Charge],-"Date Tariff Apply From") as "Current Rental Charge"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Resident Temp_Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; group by Relationship_ID&lt;SPAN style="color: #ff0000;"&gt;, [Agreement Name]&lt;/SPAN&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2018 17:57:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140036#M9814</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-07-30T17:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: "Invalid expression" error when trying to use If statement with Resident load.</title>
      <link>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140037#M9815</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your prompt response!&amp;nbsp; your addition to the group by has fixed the error, the expression now works, however it is causing other values loaded in the Current_Table loaded before this join to no longer load, which is strange.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 08:45:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140037#M9815</guid>
      <dc:creator>eoinboylan</dc:creator>
      <dc:date>2018-07-31T08:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: "Invalid expression" error when trying to use If statement with Resident load.</title>
      <link>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140038#M9816</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share a sample data and let us know what is the expected output based on the data provided?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 11:11:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140038#M9816</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-07-31T11:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: "Invalid expression" error when trying to use If statement with Resident load.</title>
      <link>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140039#M9817</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I consulted with a work colleague, it turned out he had added an Exit Script while trying to help me without my knowledge, so I was running into that and not noticing.&amp;nbsp; My own silly mistake. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression works perfectly since the introduction of the extra field in the group by. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your help Sunny!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 11:21:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140039#M9817</guid>
      <dc:creator>eoinboylan</dc:creator>
      <dc:date>2018-07-31T11:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: "Invalid expression" error when trying to use If statement with Resident load.</title>
      <link>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140040#M9818</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, I am glad you were able to figure this out with the help of your colleague.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 11:23:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/quot-Invalid-expression-quot-error-when-trying-to-use-If/m-p/140040#M9818</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-07-31T11:23:22Z</dc:date>
    </item>
  </channel>
</rss>

