<?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: Flag in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1621269#M615790</link>
    <description>&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;You helped me with a similar issue a while ago and we came up with a different solution. I've tried this way you suggested above, along with the original way you suggested to me and both yield the same correct results. Do you have any idea which is more efficient?&lt;/P&gt;&lt;P&gt;If it matters I have 10 different flags to set based on different values in the field that equate to this example's&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Cost.Element.MiKa.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here is the other solution:&lt;/P&gt;&lt;P&gt;Flags:&lt;BR /&gt;Load distinct&lt;BR /&gt;Sales.Number,&lt;BR /&gt;Sales.Number as Temp.Sales.Number,&lt;BR /&gt;dual('Yes',1) as Billing.Indicator.Sales&lt;BR /&gt;Resident Table&lt;BR /&gt;where Cost.Element.Mika='Sales';&lt;BR /&gt;Load distinct&lt;BR /&gt;Sales.Number,&lt;BR /&gt;Sales.Number as Temp.Sales.Number,&lt;BR /&gt;dual('No',0) as Billing.Indicator.Sales&lt;BR /&gt;Resident Table&lt;BR /&gt;where not Cost.Element.Mika='Sales' and not exists (Temp.Sales.Number, Sales.Number);&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Melissa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 06 Sep 2019 20:30:07 GMT</pubDate>
    <dc:creator>melissapluke</dc:creator>
    <dc:date>2019-09-06T20:30:07Z</dc:date>
    <item>
      <title>Flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311433#M615779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all, &lt;/P&gt;&lt;P&gt;I've got a problem with setting a flag in Qlikview load script.&lt;/P&gt;&lt;P&gt;What I want to do is set a Flag to all Order Numbers where Sales(Income) is recorded.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I've tried the following statement:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;NoConcatenate&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Fact_new:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;load *,&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;if(rangesum(if(Cost.Element.MiKa='Sales',Actual))&amp;lt;&amp;gt;0 or rangesum(if(Cost.Element.MiKa='Income',Actual))&amp;lt;&amp;gt;0,'billed','not billed') as Billing.Indicator.Sales&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Resident&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Fact;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Now I got a Flag to the Order Number with a recorded Sales and where Cost Element=Sales(Income). What I want to achieve is to set a flag to all order numbers where sales(income) &amp;lt;&amp;gt;0 regardless the cost element to show the CMIIa.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Is this possible? &lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Thanks in advance&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;Lukas &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 08:24:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311433#M615779</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-19T08:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: Flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311434#M615780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would you be able to share few rows of data and the expected output from the data you have shared?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 10:23:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311434#M615780</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-19T10:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: Flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311435#M615781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure!&lt;/P&gt;&lt;P&gt;That's a pretty good example. As you can see within the Order Number Sales is recorded. The Flag 'Billing.Indicator.Sales' shows billed but only where Cost Element is 'Sales'. &lt;/P&gt;&lt;P&gt;I want to have 'billed' on every entry of this Order Number because sales is recorded.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance Sunny!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 10:50:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311435#M615781</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-19T10:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311436#M615782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you say Order Number, do you mean Sales.Number field? May be you need to do like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD Sales.Number,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Object.Number,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document.Number,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %Date,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cost.Element.MiKa,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Actual&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM ....;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Left Join (Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;SPAN style="font-size: 13.3333px;"&gt;Sales.Number,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Count(DISTINCT If(&lt;SPAN style="font-size: 13.3333px;"&gt;Cost.Element.MiKa = 'Sales', &lt;SPAN style="font-size: 13.3333px;"&gt;Sales.Number) = 1, 'billed', 'not billed') as Billing.Indicator.Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Resident Table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Group By Sales.Number;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 11:01:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311436#M615782</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-19T11:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311437#M615783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh I meant 'Object.Number'. Does that make any difference?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 11:03:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311437#M615783</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-19T11:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: Flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311438#M615784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then try this&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 style="font-style: inherit; font-family: inherit;"&gt;Table:&lt;/STRONG&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 style="font-style: inherit; font-family: inherit;"&gt;LOAD Sales.Number,&lt;/STRONG&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 style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Object.Number,&lt;/STRONG&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 style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Document.Number,&lt;/STRONG&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 style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %Date,&lt;/STRONG&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 style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cost.Element.MiKa,&lt;/STRONG&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 style="font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Actual&lt;/STRONG&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 style="font-style: inherit; font-family: inherit;"&gt;FROM ....;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&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 style="font-style: inherit; font-family: inherit;"&gt;Left Join (Table)&lt;/STRONG&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 style="font-style: inherit; font-family: inherit;"&gt;LOAD &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Sales.Number,&lt;/STRONG&gt;&lt;/STRONG&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 style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style=": ; color: #ff0000; font-size: 13px; font-style: inherit; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Object.Number&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;,&lt;/SPAN&gt;&lt;/STRONG&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 style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Count(DISTINCT If(&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Cost.Element.MiKa = 'Sales', &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #ff0000; font-size: 13px; font-style: inherit; font-family: inherit;"&gt;Object.Number&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;) = 1, 'billed', 'not billed') as Billing.Indicator.Sales&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&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 style="font-style: inherit; font-family: inherit;"&gt;Resident Table&lt;/STRONG&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 style="font-style: inherit; font-family: inherit;"&gt;Group By &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Sales.Number, &lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #ff0000; font-size: 13px; font-style: inherit; font-family: inherit;"&gt;Object.Number&lt;/STRONG&gt;&lt;/STRONG&gt;;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 11:06:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311438#M615784</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-19T11:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: Flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311439#M615785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. That works!&lt;/P&gt;&lt;P&gt;Could you explain to me HOW it works?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 11:16:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311439#M615785</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-19T11:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311440#M615786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You were looking at each and every row to check for your if statement requirement. I checked at an aggregate level that Count(DISTINCT Object.Number) where any of the Cost.Element.MiKa = Sales. If It is, then call all of the Object.Number as billed, other wise call it not billed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this make sense?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 11:20:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311440#M615786</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-06-19T11:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311441#M615788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was exactly what I was looking for but had no idea how to write it in the load script!&lt;/P&gt;&lt;P&gt;Many thanks Sunny!&lt;/P&gt;&lt;P&gt;Guess this will help me in some other cases, too! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Jun 2017 11:23:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1311441#M615788</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-06-19T11:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Flag in load script</title>
      <link>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1621269#M615790</link>
      <description>&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;You helped me with a similar issue a while ago and we came up with a different solution. I've tried this way you suggested above, along with the original way you suggested to me and both yield the same correct results. Do you have any idea which is more efficient?&lt;/P&gt;&lt;P&gt;If it matters I have 10 different flags to set based on different values in the field that equate to this example's&lt;STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Cost.Element.MiKa.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Here is the other solution:&lt;/P&gt;&lt;P&gt;Flags:&lt;BR /&gt;Load distinct&lt;BR /&gt;Sales.Number,&lt;BR /&gt;Sales.Number as Temp.Sales.Number,&lt;BR /&gt;dual('Yes',1) as Billing.Indicator.Sales&lt;BR /&gt;Resident Table&lt;BR /&gt;where Cost.Element.Mika='Sales';&lt;BR /&gt;Load distinct&lt;BR /&gt;Sales.Number,&lt;BR /&gt;Sales.Number as Temp.Sales.Number,&lt;BR /&gt;dual('No',0) as Billing.Indicator.Sales&lt;BR /&gt;Resident Table&lt;BR /&gt;where not Cost.Element.Mika='Sales' and not exists (Temp.Sales.Number, Sales.Number);&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Melissa&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Sep 2019 20:30:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flag-in-load-script/m-p/1621269#M615790</guid>
      <dc:creator>melissapluke</dc:creator>
      <dc:date>2019-09-06T20:30:07Z</dc:date>
    </item>
  </channel>
</rss>

