<?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 How is the correct syntax? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-is-the-correct-syntax/m-p/345933#M127958</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlikview is case sensitive, so 'sun' should be 'Sun', and your expression should be like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= if(WeekDay(yesterday)='Sun', Sum ({1&amp;lt;Date={'$(DateYesterday2)'}, Company={'ADBR'}&amp;gt;} Quantity), Sum({1&amp;lt;Date={'$(DateYesterday1)'}, Company={'ADBR'}&amp;gt;} Quantity))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 10 Mar 2012 05:26:28 GMT</pubDate>
    <dc:creator>jagan</dc:creator>
    <dc:date>2012-03-10T05:26:28Z</dc:date>
    <item>
      <title>How is the correct syntax?</title>
      <link>https://community.qlik.com/t5/QlikView/How-is-the-correct-syntax/m-p/345929#M127954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I need to make this expression in my dinamic table and I'm not finding the right way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum (if(weekday(yesterday)='sun',{1&amp;lt;Date={'$(DateYesterday2)'}, Company={'ADBR'}&amp;gt;}, {1&amp;lt;Date={'$(DateYesterday1)'}, Company={'ADBR'}&amp;gt;} Quantity) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone can give me a hint?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression works:&lt;/P&gt;&lt;P&gt;sum ({1&amp;lt;Date={'$(DateYesterday2)'}, Company={'ADBR'}&amp;gt;} Quantity) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 20:42:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-is-the-correct-syntax/m-p/345929#M127954</guid>
      <dc:creator>rcandeo</dc:creator>
      <dc:date>2012-03-09T20:42:30Z</dc:date>
    </item>
    <item>
      <title>How is the correct syntax?</title>
      <link>https://community.qlik.com/t5/QlikView/How-is-the-correct-syntax/m-p/345930#M127955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It doesn't appear to be working that way on my end either, a possible workaround might be to define two variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;var1 = &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;sum ({1&amp;lt;Date={'$(DateYesterday2)'}, Company={'ADBR'}&amp;gt;} Quantity)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;var2 = &lt;SPAN style="color: #636363; font-family: Arial; font-size: 12px; background-color: #eef4f9;"&gt;sum ({1&amp;lt;Date={'$(DateYesterday1)'}, Company={'ADBR'}&amp;gt;} Quantity)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can just do if(weekday(yesterday)='sun',var1, var2) in your table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 21:09:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-is-the-correct-syntax/m-p/345930#M127955</guid>
      <dc:creator />
      <dc:date>2012-03-09T21:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: How is the correct syntax?</title>
      <link>https://community.qlik.com/t5/QlikView/How-is-the-correct-syntax/m-p/345931#M127956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can also just put 2 seperate expression using the if:&lt;/P&gt;&lt;P&gt;if(weekday(yesterday)='sun',&lt;/P&gt;&lt;P&gt;sum ({1&amp;lt;Date={'$(DateYesterday2)'}, Company={'ADBR'}&amp;gt;} Quantity),&lt;/P&gt;&lt;P&gt;sum({1&amp;lt;Date={'$(DateYesterday1)'}, Company={'ADBR'}&amp;gt;}Quantity))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can just create one variable that uses the same if statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DateYesterday=if(weekday(yesterday)='sun','Expression','Expression2')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then do:&lt;/P&gt;&lt;P&gt;sum({1&amp;lt;Date={'$(DateYesterday)'}, Company={'ADBR'}&amp;gt;}Quantity))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Mar 2012 21:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-is-the-correct-syntax/m-p/345931#M127956</guid>
      <dc:creator />
      <dc:date>2012-03-09T21:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: How is the correct syntax?</title>
      <link>https://community.qlik.com/t5/QlikView/How-is-the-correct-syntax/m-p/345932#M127957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Check with this&lt;/P&gt;&lt;P&gt;if(weekday(yesterday)='sun',sum ({1&amp;lt;Date={'$(DateYesterday2)'}, Company={'ADBR'}&amp;gt;} Quantity), Sum({1&amp;lt;Date={'$(DateYesterday1)'}, Company={'ADBR'}&amp;gt;} Quantity))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Celambarasan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Mar 2012 05:16:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-is-the-correct-syntax/m-p/345932#M127957</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-03-10T05:16:39Z</dc:date>
    </item>
    <item>
      <title>How is the correct syntax?</title>
      <link>https://community.qlik.com/t5/QlikView/How-is-the-correct-syntax/m-p/345933#M127958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlikview is case sensitive, so 'sun' should be 'Sun', and your expression should be like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= if(WeekDay(yesterday)='Sun', Sum ({1&amp;lt;Date={'$(DateYesterday2)'}, Company={'ADBR'}&amp;gt;} Quantity), Sum({1&amp;lt;Date={'$(DateYesterday1)'}, Company={'ADBR'}&amp;gt;} Quantity))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Mar 2012 05:26:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-is-the-correct-syntax/m-p/345933#M127958</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2012-03-10T05:26:28Z</dc:date>
    </item>
  </channel>
</rss>

