<?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 Using Field names as values in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181952#M503588</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need to replace the ("1*"} in the example below with a field in the Qlikview model.&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[ACCOUNT Code] = {"1*"}&amp;gt;} [Amount])&lt;/P&gt;&lt;P&gt;However if I use the field in this space the answer always comes back as 0.&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[ACCOUNT Code] = {ValidAccounts}&amp;gt;} [Amount])&lt;/P&gt;&lt;P&gt;ValidAccounts is a string field and looks like this 1234,2*&lt;/P&gt;&lt;P&gt;Any help will be aprreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Dec 2009 20:34:36 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-12-09T20:34:36Z</dc:date>
    <item>
      <title>Using Field names as values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181952#M503588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need to replace the ("1*"} in the example below with a field in the Qlikview model.&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[ACCOUNT Code] = {"1*"}&amp;gt;} [Amount])&lt;/P&gt;&lt;P&gt;However if I use the field in this space the answer always comes back as 0.&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;[ACCOUNT Code] = {ValidAccounts}&amp;gt;} [Amount])&lt;/P&gt;&lt;P&gt;ValidAccounts is a string field and looks like this 1234,2*&lt;/P&gt;&lt;P&gt;Any help will be aprreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 20:34:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181952#M503588</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-12-09T20:34:36Z</dc:date>
    </item>
    <item>
      <title>Using Field names as values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181953#M503589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;Here you are a possible solution using a variable.&lt;/P&gt;&lt;P&gt;I hope this help you.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 22:36:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181953#M503589</guid>
      <dc:creator />
      <dc:date>2009-12-09T22:36:54Z</dc:date>
    </item>
    <item>
      <title>Using Field names as values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181954#M503590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can set up a static Set Analysis expression using:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({$&amp;lt;[ACCOUNT Code] = {1234,"2*"}&amp;gt;} [Amount])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;I think anything with an asterisk needs to be in quotes, but straight numbers don't need it. You should be able to put quotes around all of them, so I would do that for simplification.&lt;/P&gt;&lt;P&gt;Now, I'm a little confused as to what ValidAccounts is and where it comes from. Is it a field as in for every record, you have a ValidAccounts value? Does it change for each record?&lt;/P&gt;&lt;P&gt;If ValidAccounts only has one value across the app, you can use it in Set Analysis. If it's a variable, the syntax is:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({$&amp;lt;[ACCOUNT Code] = {$(ValidAccounts)}&amp;gt;} [Amount])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Keep in mind, you need quotes around each value, so make sure the value of the variable has them.&lt;/P&gt;&lt;P&gt;If ValidAccounts is not a variable, but a field that is the same throughout the app, you can use:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({$&amp;lt;[ACCOUNT Code] = {$(=Max(ValidAccounts))}&amp;gt;} [Amount])&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Again, you need quotes around each value.&lt;/P&gt;&lt;P&gt;If ValidAccounts can be different for each record in your table, then I don't think Set Analysis will do the job. A Set Modifier in Set Analysis can't really reference a dimension or other value on a record by record basis.&lt;/P&gt;&lt;P&gt;Remember, when using a dollar sign expansion in Set Analysis, put your expression into a table, but don't give it a label. When the chart is rendered, the label will be your Set Analysis expression with the dollar sign expansion evaluated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2009 22:43:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181954#M503590</guid>
      <dc:creator />
      <dc:date>2009-12-09T22:43:26Z</dc:date>
    </item>
    <item>
      <title>Using Field names as values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181955#M503591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;Is there anyway to reference a field name as a variable inside for the 1st part of the set analysis expression?&lt;/P&gt;&lt;P&gt;Taking in your example, what if the [ACCOUNT Code] field should be referenced as a variable as well?&lt;/P&gt;&lt;P&gt;Appreciate your help.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 03 Jan 2010 23:12:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181955#M503591</guid>
      <dc:creator />
      <dc:date>2010-01-03T23:12:33Z</dc:date>
    </item>
    <item>
      <title>Using Field names as values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181956#M503592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Indiana,&lt;/P&gt;&lt;P&gt;I really don't know what you mean with using a variable in the first part of the set analysis expresion, do you want something like sum({$&amp;lt;[VAR_CODE] = {"1*"}&amp;gt;} [Amount])?&lt;/P&gt;&lt;P&gt;That doesn't have logic, you can't say variable equal to ... because that doesn't return a set of data.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2010 15:46:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181956#M503592</guid>
      <dc:creator />
      <dc:date>2010-01-04T15:46:38Z</dc:date>
    </item>
    <item>
      <title>Using Field names as values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181957#M503593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;Probably it does not make sense but I was trying a solution as described below:&lt;/P&gt;&lt;P&gt;You time list boxes for Year, Quarter/Year, Month/Year and Date. Each of those list boxes represent a field in the model.&lt;/P&gt;&lt;P&gt;If you select something on the Year you still have additional selections you can make either in the Quarter/Year, Month/Year and Date fields but if you select something on the Month/Year field you're immediatly constrainted on the selections you can make on the Quarter/Year and Year Fields.&lt;/P&gt;&lt;P&gt;So, when dealing with dimensional hierarchies I'm interested to pick the lowest level field where a choice was make and not the entire set of fields.&lt;/P&gt;&lt;P&gt;On the expression side the relevance it's impressive because of size of the set expression. Take for example:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Year]={$(v_mychoosenyear)}, [Quarter/Year]={{$(v_mychoosenquarter)}, [Month/Year]= {$(v_mychoosenmonth)}, [Date]={$(v_mychoosendate)} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;My initial questions has to do with the following:&lt;/P&gt;&lt;P&gt;It is possible to create and store in a variable which is my lowest level field where a choise was made (if (not isnull(getfieldselections([Date])), [Date], if....). Imagine I call this variable v_MyChoosenField&lt;/P&gt;&lt;P&gt;Then I could substitute the set expression by:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;$(v_MyChoosenField)={$(v_mychoosenvalue)} &amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;Am I dreaming or it's feasible on your opinion?&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Joao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jan 2010 23:11:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181957#M503593</guid>
      <dc:creator />
      <dc:date>2010-01-04T23:11:52Z</dc:date>
    </item>
    <item>
      <title>Using Field names as values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181958#M503594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joao,&lt;/P&gt;&lt;P&gt;You are a lucky guy, apparently it works as you expect, there is a file with a small example, there are three fields with their respective values, if you select any value of them the set analysis expression is evaluated based on it.&lt;/P&gt;&lt;P&gt;But .. what if ...?&lt;/P&gt;&lt;P&gt;* User make a multiple selection on a field?&lt;BR /&gt;* There is no selection on any field?&lt;/P&gt;&lt;P&gt;Well, I hope this help you.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 10:28:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181958#M503594</guid>
      <dc:creator />
      <dc:date>2010-01-05T10:28:22Z</dc:date>
    </item>
    <item>
      <title>Using Field names as values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181959#M503595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ups .. I can't upload the file, there is a time out error, I'll try later.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 10:45:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181959#M503595</guid>
      <dc:creator />
      <dc:date>2010-01-05T10:45:54Z</dc:date>
    </item>
    <item>
      <title>Using Field names as values in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181960#M503596</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;P&gt;I'll try this approach and get back to you with the results.&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;Joao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2010 13:13:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-Field-names-as-values-in-set-analysis/m-p/181960#M503596</guid>
      <dc:creator />
      <dc:date>2010-01-05T13:13:10Z</dc:date>
    </item>
  </channel>
</rss>

