<?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: Introduce String value in Set Analysis expression !! in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197305#M386045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello John , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response , you solution works . But , if I need ( User needs) to change the name of ' CAT1' or 'CAT2'&lt;/P&gt;&lt;P&gt;and to change the composant of the set analysis 'V_1 ' or V_2'&amp;nbsp; from the data source ( Excel File ) , how can he found the good value !!?? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Oct 2016 09:30:29 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-10-17T09:30:29Z</dc:date>
    <item>
      <title>Introduce String value in Set Analysis expression !!</title>
      <link>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197302#M386042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I have to variabilize amounts, the values ​​to be introduced in the expression of the set Analysis are actually not related in my data model ( and it shoud be not)&amp;nbsp; so to have good results, I have to add the different amounts value of each field forcing the sum of 4 fields because it does not match in the data model !! is to achieve an exceptional Analysis Chart @ data (below the Variable Set Analysis field shows the expression).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;The source of data is an Excel file, which can be changed from time to time, this file is linked with the modele only the by brand field ( '&lt;SPAN style="color: #800000;"&gt;MARQUE&lt;/SPAN&gt; '.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I managed to develop a procedure (&lt;SPAN style="color: #000000; font-size: 13.3333px;"&gt;QVS )&lt;/SPAN&gt; that generates set analysis &lt;SPAN style="color: #000000; font-size: 13.3333px;"&gt;expressions &lt;/SPAN&gt;, and creates the fields '&lt;SPAN style="color: #800000;"&gt;value (Set Analysis&lt;/SPAN&gt;)' &lt;SPAN style="color: #000000; font-size: 13.3333px;"&gt;corresponding to &lt;/SPAN&gt;the &lt;SPAN style="color: #800000;"&gt;CLASS&lt;/SPAN&gt;, &lt;SPAN style="color: #800000;"&gt;VARIABLE&lt;/SPAN&gt; and &lt;SPAN style="color: #800000;"&gt;BRAND &lt;SPAN style="color: #000000;"&gt;fields&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;By using the hard, that will be like : if (&lt;SPAN style="color: #800000;"&gt;VARIABLE&lt;/SPAN&gt; = 'VAR 1', sum ({&amp;lt;$ (*&lt;SPAN style="color: #0000ff;"&gt;*****&lt;/SPAN&gt;)&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;), if (&lt;SPAN style="color: #800000;"&gt;VARIABLE&lt;/SPAN&gt; = 'VAR 14', sum ({ &amp;lt;$ (&lt;SPAN style="color: #0000ff;"&gt;******&lt;/SPAN&gt;)&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;), etc ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="color: #0000ff;"&gt;*****&lt;/SPAN&gt;: Any expression that exists in the Value field (Set Analysis) &lt;SPAN style="color: #000000; font-size: 13.3333px;"&gt;corresponding &lt;/SPAN&gt;to &lt;SPAN style="color: #800000;"&gt;VARIABLE&lt;/SPAN&gt; (even online).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;I am looking for a &lt;SPAN style="text-decoration: underline;"&gt;solution&lt;/SPAN&gt; that allows to introduce String of the Value column (Set Analysis) in an amount for each line of the table as: &lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt; ({&amp;lt;$ (= '$ &lt;SPAN style="text-decoration: underline;"&gt;&lt;SPAN style="color: #0000ff; text-decoration: underline;"&gt;&lt;STRONG&gt;(Value) (Set Analysis)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;)&amp;gt;} &lt;SPAN style="color: #800000;"&gt;Sales&lt;/SPAN&gt;) !!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Subcontractor for any other proposals and explanations.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Thank you in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 08:01:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197302#M386042</guid>
      <dc:creator />
      <dc:date>2016-10-14T08:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Introduce String value in Set Analysis expression !!</title>
      <link>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197303#M386043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having a little trouble following, but it seems you want a different set analysis expression for every line in the table, and these set analysis expressions are already built in script as variables? Does which variable you want to use depend on the value in field CATEGORIE? Maybe you could build one more variable in your script to pick the right expression based on CATEGORIE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;pick(match(CATEGORIE,'CAT_1','CAT_13',...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,sum({&amp;lt;$(V_1)&amp;gt;} Sales)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;,sum({&amp;lt;$(V_13)&amp;gt;} Sales)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;...)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I do that in one of my applications, or something very much like that. I hated needing to do it, but it was the only way I could figure out to make a particular chart work EXACTLY like a user wanted, and the user was very insistent that it work EXACTLY like he wanted, not merely present the same information.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 17:32:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197303#M386043</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-14T17:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Introduce String value in Set Analysis expression !!</title>
      <link>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197304#M386044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For more on this sort of approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-1335"&gt;Evaluating "sets" in the context of a dimension&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Oct 2016 17:36:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197304#M386044</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-14T17:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Introduce String value in Set Analysis expression !!</title>
      <link>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197305#M386045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello John , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response , you solution works . But , if I need ( User needs) to change the name of ' CAT1' or 'CAT2'&lt;/P&gt;&lt;P&gt;and to change the composant of the set analysis 'V_1 ' or V_2'&amp;nbsp; from the data source ( Excel File ) , how can he found the good value !!?? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 09:30:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197305#M386045</guid>
      <dc:creator />
      <dc:date>2016-10-17T09:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: Introduce String value in Set Analysis expression !!</title>
      <link>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197306#M386046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you saying that the user controls the Excel file? So they might, say, add and remove CATEGORIEs, or change what a given CATEGORIE includes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm imagining your spreadsheet looking something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CATEGORIE&amp;nbsp; CATEGORY&amp;nbsp;&amp;nbsp; FAMILY&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GROUP TYPE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CAT_1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR1,VAR2&amp;nbsp; VAR1&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR1&amp;nbsp; VAR1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;CAT_13&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VAR1,VAR2&amp;nbsp; VAR1,VAR2,VAR3,VAR4,VAR5,VAR6&amp;nbsp; ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure it's not exactly that, but containing that kind of information. If so, that's what I was already visualizing when I made my suggestion, just figured you'd maintain it instead of a user, but certainly your script doesn't know who maintains it. Either way, you read in the spreadsheet and build all your variables from it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ah, or maybe you didn't catch part of what I said, that the pick(match(...)...) itself is just another variable built in your script from the spreadsheet? It's not something you're typing in and maintaining manually. You'd build it automatically from the spreadsheet just like all your other variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or have I misunderstood what you're asking?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Oct 2016 16:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197306#M386046</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-17T16:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: Introduce String value in Set Analysis expression !!</title>
      <link>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197307#M386047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;It's just what you have imaginated by the spreadsheet , and it's look like what you have write.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;User controls the Excel file , yes, and they can add/remove/change CATEGORY and what a given VATEGORY includes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tryng an other function, in my script , it works by &lt;STRONG&gt;IF&lt;/STRONG&gt; , but not the &lt;STRONG&gt;Pick( match (...)...)&lt;/STRONG&gt; !! and of corse the function takes a lot of time to visualise the CROSS table on designer .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 07:56:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197307#M386047</guid>
      <dc:creator />
      <dc:date>2016-10-18T07:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Introduce String value in Set Analysis expression !!</title>
      <link>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197308#M386048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suspect that pick(match()) is more efficient than a lot of nested IFs, but I don't know for sure that it is. I can't help with the resulting expression being hard to see or to understand. But in case it's of use, here's the code where I build a pick(match()) like this. In my case, each validation month got its own expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;[Months]:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LOAD date(fieldvalue('Validation Month',recno())) as [Month]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;AUTOGENERATE fieldvaluecount('Validation Month')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vExpression = 'pick(1+match([Validation Month]';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FOR I = 1 TO noofrows('Months')&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vExpression = vExpression &amp;amp; ',' &amp;amp; chr(39) &amp;amp; date(fieldvalue('Month',$(I)),'MMM YYYY') &amp;amp; chr(39);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vExpression = vExpression &amp;amp; '),0';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;FOR I = 1 TO noofrows('Months') &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vExpression = vExpression &amp;amp; ',vm' &amp;amp; $(I);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; LET vm$(I) = ...you're already building these just fine...;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;LET vExpression = vExpression &amp;amp; ')';&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;DROP TABLE [Months];&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Oct 2016 23:18:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Introduce-String-value-in-Set-Analysis-expression/m-p/1197308#M386048</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2016-10-18T23:18:53Z</dc:date>
    </item>
  </channel>
</rss>

