<?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: creating a new column in the visualization via set analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1606993#M45003</link>
    <description>correction:&lt;BR /&gt;=if ((Count({ (&amp;lt;A={'1'} , B={'10'}&amp;gt; ) } ID) &amp;lt;&amp;gt; 0 ) ,'YES' ,'NO')&lt;BR /&gt;this is the used syntax. Above is a drop and drop error</description>
    <pubDate>Mon, 29 Jul 2019 12:23:39 GMT</pubDate>
    <dc:creator>bernhard_koehle</dc:creator>
    <dc:date>2019-07-29T12:23:39Z</dc:date>
    <item>
      <title>creating a new column in the visualization via set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1606966#M45000</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have a problem in the visualization by creating a new column via set analysis in a simple table.&lt;/P&gt;&lt;P&gt;The database contains 3 column &amp;nbsp;&amp;nbsp;which are displayed in a table like:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;ID&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;A&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;B&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;10&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;-40&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;3&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;30&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;2&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;7&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;20&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;5&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;55&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;-50&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;6&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;63&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;-60&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I want to create a new column depending of the values of A and B.&lt;/P&gt;&lt;P&gt;A simple new column as a function via: &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;&amp;nbsp;if (A=1 AND B=10,'YES','NO')&amp;nbsp; is working BUT very slow&lt;/STRONG&gt; (depending of data).&amp;nbsp;&lt;STRONG&gt; I get 6 rows with Yes or No.&amp;nbsp; (Fine)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Because of the performance &amp;nbsp;I have to use set analysis.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Now I use:&amp;nbsp; &amp;nbsp;if (&amp;nbsp;&amp;nbsp;&amp;nbsp; (Count(&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ( &lt;/STRONG&gt;&amp;lt;a={'1'} ,="" b="{'10'}"&amp;gt;&amp;nbsp; )&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID)&amp;nbsp; &amp;lt;&amp;gt; 0 )&amp;nbsp; ,'YES','NO')&amp;lt;/a={'1'}&amp;gt;&lt;/P&gt;&lt;P&gt;But now I &lt;STRONG&gt;get only one row&lt;/STRONG&gt; which contains only YES for A=1 and B=10.&amp;nbsp; All other lines are not shown.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is my missunderstanding?&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Bernhard&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;Creating the data:&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD * inline [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID,A,B&lt;/P&gt;&lt;P&gt;1,1,10&lt;/P&gt;&lt;P&gt;2,7,20&lt;/P&gt;&lt;P&gt;3,4,30&lt;/P&gt;&lt;P&gt;4,4,-40&lt;/P&gt;&lt;P&gt;5,55,-50&lt;/P&gt;&lt;P&gt;6,63,-60&lt;/P&gt;&lt;P&gt;] (delimiter is ',');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;exit script;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:08:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1606966#M45000</guid>
      <dc:creator>bernhard_koehle</dc:creator>
      <dc:date>2024-11-16T05:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: creating a new column in the visualization via set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1606993#M45003</link>
      <description>correction:&lt;BR /&gt;=if ((Count({ (&amp;lt;A={'1'} , B={'10'}&amp;gt; ) } ID) &amp;lt;&amp;gt; 0 ) ,'YES' ,'NO')&lt;BR /&gt;this is the used syntax. Above is a drop and drop error</description>
      <pubDate>Mon, 29 Jul 2019 12:23:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1606993#M45003</guid>
      <dc:creator>bernhard_koehle</dc:creator>
      <dc:date>2019-07-29T12:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: creating a new column in the visualization via set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1606996#M45004</link>
      <description>&lt;P&gt;How about this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Concat(DISTINCT {&amp;lt;A = {1}, B = {10}&amp;gt;} 'YES') &amp;amp;
Concat(DISTINCT {&amp;lt;A -= {1}&amp;gt;+&amp;lt;B -= {10}&amp;gt;} 'NO')&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 29 Jul 2019 12:28:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1606996#M45004</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-07-29T12:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: creating a new column in the visualization via set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607011#M45005</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Thanks for your replay.&lt;/P&gt;&lt;P&gt;But it is not working.&lt;/P&gt;&lt;P&gt;I get 6 lines and the new column is empty.&lt;/P&gt;&lt;P&gt;If I only use Concat(DISTINCT {&amp;lt;A = {1}, B = {10}&amp;gt;} 'YES') I only get one line.&amp;nbsp;An other reason for using my kind of syntax is the count of conditions. In the real app there are up to 6 conditions in one line which are combined with up to 10 OR’sRegards&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2019 12:49:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607011#M45005</guid>
      <dc:creator>bernhard_koehle</dc:creator>
      <dc:date>2019-07-29T12:49:28Z</dc:date>
    </item>
    <item>
      <title>Re: creating a new column in the visualization via set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607030#M45007</link>
      <description>&lt;P&gt;This seems to work&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Concat({&amp;lt;A = {1}, B = {10}&amp;gt;} DUAL('YES', ID)) &amp;amp; Concat({&amp;lt;A -= {1}&amp;gt;+&amp;lt;B -= {10}&amp;gt;} DUAL('NO', ID))&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 29 Jul 2019 13:16:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607030#M45007</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-07-29T13:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: creating a new column in the visualization via set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607032#M45009</link>
      <description>why don't add a new field on script as below ?&lt;BR /&gt;ex.&lt;BR /&gt;Temp:&lt;BR /&gt;load *,&lt;BR /&gt;if (A=1 AND B=10,'YES','NO') as newField;&lt;BR /&gt;LOAD * inline [&lt;BR /&gt;ID,A,B&lt;BR /&gt;1,1,10&lt;BR /&gt;2,7,20&lt;BR /&gt;3,4,30&lt;BR /&gt;4,4,-40&lt;BR /&gt;5,55,-50&lt;BR /&gt;6,63,-60&lt;BR /&gt;] (delimiter is ',');&lt;BR /&gt;&lt;BR /&gt;and use newField in UI.</description>
      <pubDate>Mon, 29 Jul 2019 13:25:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607032#M45009</guid>
      <dc:creator>agigliotti</dc:creator>
      <dc:date>2019-07-29T13:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: creating a new column in the visualization via set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607282#M45048</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;yes your code is running and shows 6 rows. And in each is written YES or NO. That’s what I am looking for.&lt;/P&gt;&lt;P&gt;But I don’t beliefe that I can use such kind of code, because my app is much more complex and I have to support and change the conditions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is real code for one row in the app (and it is not the most complex example).&lt;/P&gt;&lt;P&gt;For explanation:&lt;/P&gt;&lt;P&gt;-I only want JA = YES in the row&amp;nbsp; (the else isn’t important&amp;nbsp; // JA at the end without NO)&lt;/P&gt;&lt;P&gt;-the YES is only wanted if the lower (more complex conditions) is wrong&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see there is a lot of AND&amp;nbsp; in one line.&amp;nbsp; And the lines are combined via OR.&lt;/P&gt;&lt;P&gt;And at least there is an OR for the next conditions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;=if ((Count({&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;&amp;lt;KEIMGATTUNGART={'Escherichia|coli'}&amp;nbsp; , MBAntCode={'Piperacillin'},AntErg-={'S'}&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp; &amp;lt;MBAntCode={'Cefotaxim'},AntErg-={'S'}&amp;gt;&amp;nbsp;&amp;nbsp; *&amp;nbsp; &amp;lt;MBAntCode={'Ciprofloxacin'},AntErg-={'S'}&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="6"&gt;+&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;KEIMGATTUNGART={'Escherichia|coli'}&amp;nbsp; , MBAntCode={'Piperacillin'},AntErg-={'S'}&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *&amp;nbsp; &amp;lt;MBAntCode={'Ceftazidim'},AntErg-={'S'}&amp;gt;&amp;nbsp; *&amp;nbsp; &amp;lt;MBAntCode={'Ciprofloxacin'},AntErg-={'S'}&amp;gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;} AuftMatKnr)&amp;nbsp; &amp;lt;&amp;gt; 0 )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="7"&gt;&lt;STRONG&gt;*&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;if (Count(&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;lt;KEIMGATTUNGART={'Escherichia|coli'} , MBAntCode={'Piperacillin'} , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Ciprofloxacin'} , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Cefotaxim'}&amp;nbsp; , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Imipenem'}&amp;nbsp;&amp;nbsp; , AntErg-={'S'}&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="6"&gt;+&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;KEIMGATTUNGART={'Escherichia|coli'} , MBAntCode={'Piperacillin'} , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Ciprofloxacin'} , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Cefotaxim'}&amp;nbsp; , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Meropenem'}&amp;nbsp; , AntErg-={'S'}&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="6"&gt;+&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;KEIMGATTUNGART={'Escherichia|coli'} , MBAntCode={'Piperacillin'} , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Ciprofloxacin'} , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Ceftazidim'}&amp;nbsp; , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Imipenem'}&amp;nbsp;&amp;nbsp; , AntErg-={'S'}&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="6"&gt;+&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;KEIMGATTUNGART={'Escherichia|coli'} , MBAntCode={'Piperacillin'} , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Ciprofloxacin'} , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Ceftazidim'}&amp;nbsp; , AntErg-={'S'}&amp;gt; * &amp;lt;MBAntCode={'Meropenem'} &amp;nbsp;, AntErg-={'S'}&amp;gt;&lt;/P&gt;&lt;P&gt;} AuftMatKnr) = 0 ,1,0)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;,'JA','')&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While changing the code I was doubtful if the code is correct. The row is only an optional information and don’t has to eliminate row’s. Therefore i wrote my simple example app to check.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my question: why does set analysis &amp;nbsp;is eliminating rows in my sample-code. What is my missunderstanding?&amp;nbsp;&lt;/P&gt;&lt;P&gt;if ((Count({ ( &amp;lt;A={'1'} , B={'10'}&amp;gt; ) } ID)&amp;nbsp; &amp;lt;&amp;gt; 0 ) ,'JA','NEIN')&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regrads&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 05:38:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607282#M45048</guid>
      <dc:creator>bernhard_koehle</dc:creator>
      <dc:date>2019-07-30T05:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: creating a new column in the visualization via set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607284#M45049</link>
      <description>If the else is to slow. And i have to interact with the filters in the app. So i have to do it in the visualisation.</description>
      <pubDate>Tue, 30 Jul 2019 05:40:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607284#M45049</guid>
      <dc:creator>bernhard_koehle</dc:creator>
      <dc:date>2019-07-30T05:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: creating a new column in the visualization via set analysis</title>
      <link>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607689#M45083</link>
      <description>&lt;P&gt;&lt;EM&gt;So my question: why does set analysis &amp;nbsp;is eliminating rows in my sample-code. What is my missunderstanding?&amp;nbsp;&lt;BR /&gt;&lt;/EM&gt;&lt;EM&gt;if ((Count({ ( &amp;lt;A={'1'} , B={'10'}&amp;gt; ) } ID)&amp;nbsp; &amp;lt;&amp;gt; 0 ) ,'JA','NEIN')&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Because that is what the set analysis do... it will show value based on your condition and would totally hide things which are out of set analysis's selection.... may be try this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;If(Count({&amp;lt; A = {'1'}, B = {'10'}&amp;gt;} ID) + Sum(0) &amp;lt;&amp;gt; 0, 'JA', 'NEIN') &lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 30 Jul 2019 18:36:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/creating-a-new-column-in-the-visualization-via-set-analysis/m-p/1607689#M45083</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-07-30T18:36:29Z</dc:date>
    </item>
  </channel>
</rss>

