<?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: Variable problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881279#M307504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, your filter needs to adapt to your number of fields and field elements. That's where somewhat complicated formula comes from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And regarding your post earlier this day, a little hint: rowno() will not return 1, but zero when used in a where clause for the first record coming in, until there is actually a record in the output table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jun 2015 14:25:04 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-06-16T14:25:04Z</dc:date>
    <item>
      <title>Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881261#M307486</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;I have a problem with a variable:&lt;/P&gt;&lt;P&gt;- I now actually prefer defining all the necessary variables in the script - that way I can be sure that I can delete all the variables in the&lt;BR /&gt;&amp;nbsp;&amp;nbsp; variable_manager and be sure that all the necessary ones will be re-created and only the non_necessary ones are gone.&lt;/P&gt;&lt;P&gt;- For variables that are populated on the GUI, there is the syntax (for example)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt; SET v_myvar = = Getfieldselections(date); &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;- In my current app there are several blocks in the script, each one with a condition for the execution, a variable &amp;gt; v_database_action &amp;lt;&lt;/P&gt;&lt;P&gt;- In one specific block (where $(v_database_action)=6 ) I have to do a RESIDENT LOAD from one other table (that is also loaded in that&lt;BR /&gt;&amp;nbsp;&amp;nbsp; block) with a WHERE condition specifying that one specific field in the table be equal to that variable.&lt;/P&gt;&lt;P&gt;- That variable, though initiated in the script, has in the meantime (through some other action by the user) been filled with a value (and&lt;BR /&gt;&amp;nbsp;&amp;nbsp; that SET command is set to NOT be executed when $(v_database_action)=6, so that it isn't reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;=&amp;gt; Still, that WHERE condition fails and when I load without it and I load the value of that variable is exactly that formula, not its output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same happens when I define that variable on the GUI. The script, when reloading with $(v_database_action)=6, uses the formula, not the output. Thus of course it cannot find any matching records.&lt;/P&gt;&lt;P&gt;Is there any way around this other than asking the user on the GUI to actually type the nr of the record they want to edit?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 08:47:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881261#M307486</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-12T08:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881262#M307487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I somewhere got lost after line 5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Programmers are more used to read code than prose, would it be possible that you upload a small sample QVW or at least the relevant snippet of your script code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 08:55:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881262#M307487</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-12T08:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881263#M307488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;well, not really - I could, but putting together another sample_file would take me about as much time as trying out a few things.&lt;/P&gt;&lt;P&gt;The whole novel boils down to the question whether QlikView can, when reloading the script from the GUI, access and use the current value of a variable that is created with Getfieldselections().&lt;/P&gt;&lt;P&gt;As yet, it seems that doesn't work because QlikView doesn't really register that value. When I somehow quote that variable in the script, QlikView uses the formula (that it was defined with), not the current value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the status of things - now I have to ask the user to type the nr. of the record they want to work on so I have a fixed value that QlikView can use. Not the most elegant solution, and believe it or not, it is still error-prone - typing an 8-digit number might seem easy, but you know maybe how creative people can be when it comes to inventing new ways of doing things wrong &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: Sorry, don't get me wrong, I am well aware that it is me asking help and you trying to give it, so it should be worth my time putting together a sample for you to do so. Let me see. I have made something up yesterday or so, I might be able to re-use that. If I find it works, I will upload it before taking my lunch break.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 09:06:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881263#M307488</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-12T09:06:32Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881264#M307489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can probably create an additional action before your user triggered reload to copy the &lt;EM&gt;content&lt;/EM&gt; of that variable to another variable, which you can then use in your script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: Yes, seems to work for me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 09:20:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881264#M307489</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-12T09:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881265#M307490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that sounds good - so I can create another variable and just go like&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; SET v_myvar2 = v_myvar &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;Do I need to use SET or LET in that case? SET, no?&lt;/P&gt;&lt;P&gt;I'm just working on that sample file and app I had put together yesterday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There you go. I hope that will serve to illustrate where my problem is, though I think you've already got it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 09:24:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881265#M307490</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-12T09:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881266#M307491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe the assignment needs to be done in the action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to create the variable before you use it, either in the variable overview, or in the script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since you prefer latter, create the variable after you need to use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set v_myvar2 = DummyValue;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That means, you need to test the variable if it's the first time you reload or not (or, if you are sure about the consequences, use a default value instead of DummyValue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in the UI, I assume you have a button with Reload action.&lt;/P&gt;&lt;P&gt;Add another action first place: External -&amp;nbsp; Set Variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_myvar2&lt;/P&gt;&lt;P&gt;=v_myvar&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 09:30:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881266#M307491</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-12T09:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881267#M307492</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;yes, that seems to work &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Great. Now I have a different problem, though, as I get way too many records - that header_line (Claim) has a dozen or so position_lines, but I get about 29k records from that LOAD.&lt;/P&gt;&lt;P&gt;The load has four Subfield() commands (supposed to make a list of values into a number of records).&lt;/P&gt;&lt;P&gt;Could that be a reason? Does that generate some kind of cartesian product? The help says it will generate that if the Subfield() functions are nested, but they are not - they are in different lines of the LOAD and for different fields.&lt;/P&gt;&lt;P&gt;Actually, the nr. of records should of course be the same for all four fields.&lt;/P&gt;&lt;P&gt;The background is, I have aggregated it beforehand, but I want to show a proper listbox with those values.&lt;/P&gt;&lt;P&gt;Or could it be because there is an * in one of the fields?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: Well, I have removed the * (replaced it with real numbers) and the issue remains, so it must be some cartesian product between the SUBFIELD() functions in the different lines of the LOAD.&lt;/P&gt;&lt;P&gt;How else could I do that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.P.S.: Yes, it is a cartesian - the Claim has 13 position_lines and 13 x 4 = 28.561 (or so)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 09:53:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881267#M307492</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-12T09:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881268#M307493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you help me once more?&lt;/P&gt;&lt;P&gt;Just deleting the function so I have just one Subfield() in the LOAD and the three other fields just like that doesn't help - then I get the complete list of values in every record - but I want every record to have its respective value out of that list - so that cartesian product was closer to "correct" ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 11:38:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881268#M307493</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-12T11:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881269#M307494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post an example of one of these input records and what you expect to get after the transformation?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 11:42:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881269#M307494</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-12T11:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881270#M307495</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;it's actually pretty easy.&lt;/P&gt;&lt;P&gt;I have three fields with lists of values that I have put together in an earlier script_block - each one looks like&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; 1 | 2 | 3 | 4 ... &amp;lt;&amp;lt; - there are 13 records (13 position_lines within that one Claim).&lt;/P&gt;&lt;P&gt;When I use &lt;STRONG&gt;Subfield([field], ' | ')&lt;/STRONG&gt; for just one of those three fields, thus my LOAD looks like&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Claim_Nr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield(FKolli, ' | ') as FKolli_temp&lt;/P&gt;&lt;P&gt;RESIDENT ClaimDaten&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;=&amp;gt; Then I do get 13 records, that is correct (I have omitted the WHERE clause here, but I do have that).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I go like&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Claim_Nr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield(FKolli, ' | ') as FKolli_temp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [field2],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [field3]&lt;/P&gt;&lt;P&gt;RESIDENT ClaimDaten&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;=&amp;gt; then I do get 13 records, but every one has the complete list of values in [field2] and [field3].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I go like&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Claim_Nr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield(FKolli, ' | ') as FKolli_temp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield([field2], ' | ') as field2_temp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield([field3], ' | ') as field3_temp&lt;/P&gt;&lt;P&gt;RESIDENT ClaimDaten&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;=&amp;gt; Then I get 13 x 13 x 13 records&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want is 13 records, but each one with its respective value in each of these 3 fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an idea how I can achieve that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: When I start with a LOAD with just one Subfield() and then join two others like it (each time using the fct on a different field), the result is the same, I get a cartesian product.&lt;/P&gt;&lt;P&gt;I could use DISTINCT, but only on one out of those three fields for in the others, several out of those 13 records might have the same value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 11:50:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881270#M307495</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-12T11:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881271#M307496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your fields all have the same number of subfield items and you want in your output table the subfield items aligned, that is only records with first item of field1, first item field2, first item field3 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;where ID2 = (RowNo() *F1*F2 + RowNo()*F3 + RowNo()+1);&lt;/P&gt;&lt;P&gt;LOAD *, recno() as ID2;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Claim_Nr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield(FKolli, ' | ') as FKolli_temp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield([field2], ' | ') as field2_temp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield([field3], ' | ') as field3_temp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; substringcount([FKolli],' | ')+1 as F1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; substringcount([field2],' | ')+1 as F2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; substringcount([field3],' | ')+1 as F3&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;Claim_Nr, FKolli, field2, field3&lt;/P&gt;&lt;P&gt;1, "A1 | A2 | A3 | A4", "B1 | B2 | B3 | B4", "C1 | C2 | C3 | C4"&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 12:39:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881271#M307496</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-12T12:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881272#M307497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will take a while to understand what this code is doing. There is some mathematics behind it, of course. I had a similar solution to the cartesian product when many-joining two tables, but this is different.&lt;/P&gt;&lt;P&gt;Let's see. I'll keep you posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: Okay, it seems to do exactly what it is supposed to.&lt;/P&gt;&lt;P&gt;I guess if i were to add one more field to that - I do have one more actually, I just omitted it in my question - I will have to somehow adapt that logic? I haven't understood it yet, so I cannot tell how.&lt;/P&gt;&lt;P&gt;Would you mind explaining the logic&amp;nbsp; behind your code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 13:01:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881272#M307497</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-12T13:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881273#M307498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just have a look at the table created without the top preceding load with its where clause.&lt;/P&gt;&lt;P&gt;ID2 is just a counter of created lines. Then identify which lines you want to keep and try to build a logic around that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;where ID2 = (RowNo() *F1*F2*F3 + RowNo()*F3*F2 + RowNo()*F4 +rowno()+1);&lt;/P&gt;&lt;P&gt;LOAD *, recno() as ID2;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Claim_Nr,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield(FKolli, ' | ') as FKolli_temp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield([field2], ' | ') as field2_temp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield([field3], ' | ') as field3_temp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Subfield([field4], ' | ') as field4_temp,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; substringcount([FKolli],' | ')+1 as F1,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; substringcount([field2],' | ')+1 as F2,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; substringcount([field3],' | ')+1 as F3,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; substringcount([field4],' | ')+1 as F4&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;Claim_Nr, FKolli, field2, field3, field4&lt;/P&gt;&lt;P&gt;1, "A1 | A2 | A3 | A4", "B1 | B2 | B3 | B4", "C1 | C2 | C3 | C4", "D1 | D2 | D3 | D4"&lt;/P&gt;&lt;P&gt;]&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 13:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881273#M307498</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-12T13:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881274#M307499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is too much for a Friday afternoon in an office with approx. 27° ... I'll think about it over the weekend.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 14:21:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881274#M307499</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-12T14:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881275#M307500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's probably a good idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't get confused with the different fields F1,F2,F3,F4. Since this approach only really works with fields having same number of subitems, all 4 numbers are equal (and can be replaced by using just one of them).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 14:24:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881275#M307500</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-12T14:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881276#M307501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have now removed F2, F3 and F4 (renamed them all to F1)´, but I still don't understand. I'm not much of a mathematician. My uncle was, but I clearly did not inherit this - for which I am thankful in other ways &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you mind helping me understand this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, if I assume that I have 10 elements, then&lt;/P&gt;&lt;P&gt;- when rowNo() is 1 (in record #1), that means ID2 = 1*10*10 + 1*10*10 + 1*10 + 1+1 = 212&lt;/P&gt;&lt;P&gt;- when rowNo() is 2 (in record #2), it means ID2 = 2*10*10 + 2*10*10 + 2*10 + 2+1 = 423&lt;/P&gt;&lt;P&gt;- when rowNo() is 3 (in record #3) it means ID2 = 3*10*10 + 3*10*10 + 3*10 + 3 + 1 = 634&lt;/P&gt;&lt;P&gt;OK, so it always adds 211, starting at 212 - but why?&lt;/P&gt;&lt;P&gt;I would have thought that with 10*10*10*10 = 10.000 records, then every 1000th record, everything would be new, so I'd load records 1, 1001, 2002, 3003 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There seems to be an error in the logic, too - the table (with 14 items) still has 95 lines - but some items seem to be there several times, so I have to clear that up before I can tell you what exactly the problem is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: Okay, there are 13 different sub_items in that item. But 13*13 is not 95, so I'm not quite sure what is wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 08:11:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881276#M307501</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-16T08:11:15Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881277#M307502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;nice thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 08:26:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881277#M307502</guid>
      <dc:creator />
      <dc:date>2015-06-16T08:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881278#M307503</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;okay, I have come up with some alternative logic. I build my own list of records that I want to extract.&lt;/P&gt;&lt;P&gt;When there are four elements, for instance, this list looks like&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; 1, 65, 129, 193 &amp;lt;&amp;lt;&lt;/P&gt;&lt;P&gt;How can I now build a LOAD that extracts (RESIDENT) only these records?&lt;/P&gt;&lt;P&gt;I have tried with a MATCH() which should work when I have a list of values, but something is clearly wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me here? There must be some stupid mistake in my syntax, it's really annoying.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.: OK, I have found my error. Now the whole thing works.&lt;/P&gt;&lt;P&gt;The logic is this:&lt;/P&gt;&lt;P&gt;- If there are 4 elements, I want records 1, 65, 129 and 193 (out of 256)&lt;/P&gt;&lt;P&gt;- If there are 3, I want records 1, 28 and 55 (out of 81)&lt;/P&gt;&lt;P&gt;- If there are 2, I want records 1 and 9&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 14:01:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881278#M307503</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-16T14:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881279#M307504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, your filter needs to adapt to your number of fields and field elements. That's where somewhat complicated formula comes from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And regarding your post earlier this day, a little hint: rowno() will not return 1, but zero when used in a where clause for the first record coming in, until there is actually a record in the output table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jun 2015 14:25:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881279#M307504</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-16T14:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Variable problem</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881280#M307505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;I noticed there was something wrong. Now I have two LOADs - the first returns that cartesian product, but also a Line_ID, and the second RESIDENT (I try to avoid the preceding because it's harder for others to understand) then extract just the records I want - I have an inbetween step where I calculate, in a loop, which records I want to extract.&lt;/P&gt;&lt;P&gt;Now it works fine.&lt;/P&gt;&lt;P&gt;Thanks a lot!&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DataNibbler&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jun 2015 06:30:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-problem/m-p/881280#M307505</guid>
      <dc:creator>datanibbler</dc:creator>
      <dc:date>2015-06-17T06:30:38Z</dc:date>
    </item>
  </channel>
</rss>

