<?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: Help! Variable with Set Analysis, Variable with if, results Into a field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-Variable-with-Set-Analysis-Variable-with-if-results-Into-a/m-p/1110206#M367241</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A dimension should return something 1 dimensional, like a field, not a scalar like your expression variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could maybe use advanced aggregation to create a calculated dimension, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Aggr( $(vClassCount), &lt;EM&gt;YourDimensionalFieldTGroupBy&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13.3333px;"&gt;YourDimensionalFieldTGroupBy &lt;/EM&gt;could be a (list of) field names, like &lt;EM&gt;CustomerID&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2967"&gt;AGGR...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4418"&gt;Pitfalls of the Aggr function&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 May 2016 10:01:46 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-05-20T10:01:46Z</dc:date>
    <item>
      <title>Help! Variable with Set Analysis, Variable with if, results Into a field</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Variable-with-Set-Analysis-Variable-with-if-results-Into-a/m-p/1110205#M367240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have been trying to get results into a Dimension field from 2 variables One Variable using&amp;nbsp; set analysis then another using "If " on the&amp;nbsp; first &lt;SPAN style="font-size: 13.3333px;"&gt;set analysis&lt;/SPAN&gt;&amp;nbsp; Variable My approach may be incorrect what is the correct way to achieve this? Have tried in Script Calculated Dimension with No results... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st variable setup in Variable Overview &lt;/P&gt;&lt;P&gt;vClass = NUM(sum({$&amp;lt;TRANS_TYPE={'DRINV','DRCDT'},ThreeMthsFlag={'1'}&amp;gt;}ENTERED_QTY)/3*12/SL_ON_HAND_QTY,'###.##')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this returns data correctly in Straight table expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then the &lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt; S&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; line-height: 1.5em;"&gt;econd &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;variable I have &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;IF($(vClass)&amp;gt;=0 and $(vClass)&amp;lt;=3, '0&amp;lt;= LOW &amp;lt;3',&lt;/P&gt;&lt;P&gt;IF($(vClass)&amp;gt;=3 and $(vClass)&amp;lt;=6, '6&amp;lt;= MED&amp;lt;9',&lt;/P&gt;&lt;P&gt;IF($(vClass)&amp;gt;=6 and $(vClass)&amp;lt;=9, '9&amp;lt;= HIGH &amp;lt;12',0)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now this works in an expression&amp;nbsp;&amp;nbsp; = $(vClassCount)&amp;nbsp;&amp;nbsp; in a straight table but I wish to use this on a Dimension in Graph&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;any Guidance Appreciated &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 02:49:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Variable-with-Set-Analysis-Variable-with-if-results-Into-a/m-p/1110205#M367240</guid>
      <dc:creator>Peter_Brunner</dc:creator>
      <dc:date>2016-05-20T02:49:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help! Variable with Set Analysis, Variable with if, results Into a field</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Variable-with-Set-Analysis-Variable-with-if-results-Into-a/m-p/1110206#M367241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A dimension should return something 1 dimensional, like a field, not a scalar like your expression variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could maybe use advanced aggregation to create a calculated dimension, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Aggr( $(vClassCount), &lt;EM&gt;YourDimensionalFieldTGroupBy&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13.3333px;"&gt;YourDimensionalFieldTGroupBy &lt;/EM&gt;could be a (list of) field names, like &lt;EM&gt;CustomerID&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2967"&gt;AGGR...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4418"&gt;Pitfalls of the Aggr function&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 10:01:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Variable-with-Set-Analysis-Variable-with-if-results-Into-a/m-p/1110206#M367241</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-20T10:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Help! Variable with Set Analysis, Variable with if, results Into a field</title>
      <link>https://community.qlik.com/t5/QlikView/Help-Variable-with-Set-Analysis-Variable-with-if-results-Into-a/m-p/1110207#M367242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I worked out the best way to handle this is create a field by changing &lt;/P&gt;&lt;P&gt;e.g:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load * ,&lt;/P&gt;&lt;P&gt;if(match(TRANS_TYPE,'DRINV','DRCDT' and ThreeMthsFlag='1'),ENTERED_QTY)/3*12/SL_ON_HAND_QTY as vClass&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then loaded Field&amp;nbsp; vClass&amp;nbsp; again in another table with If statements to create data needed &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your Reply Stefan it was Helpful !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 May 2016 04:15:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-Variable-with-Set-Analysis-Variable-with-if-results-Into-a/m-p/1110207#M367242</guid>
      <dc:creator>Peter_Brunner</dc:creator>
      <dc:date>2016-05-27T04:15:02Z</dc:date>
    </item>
  </channel>
</rss>

