<?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 Multiple selections on same field with one acting as a baseline in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Multiple-selections-on-same-field-with-one-acting-as-a-baseline/m-p/257134#M584301</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for a way to allow multiple selections on the same "field". One selection is forced as a "Always one selected" and provides a baseline for comparison, while the second selection can be multiple choices. What I would like to achieve is a chart showing the selected second-selection, and the ratio between the baseline selection and the second selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the following data:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="249"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" width="72"&gt;Product&lt;/TD&gt;&lt;TD class="xl66" width="72"&gt;Sales&lt;/TD&gt;&lt;TD class="xl66" width="105"&gt;Margin&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;A1&lt;/TD&gt;&lt;TD class="xl65"&gt;1000&lt;/TD&gt;&lt;TD class="xl65"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;B2&lt;/TD&gt;&lt;TD class="xl65"&gt;500&lt;/TD&gt;&lt;TD class="xl65"&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;C3&lt;/TD&gt;&lt;TD class="xl65"&gt;1500&lt;/TD&gt;&lt;TD class="xl65"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;D4&lt;/TD&gt;&lt;TD class="xl65"&gt;100&lt;/TD&gt;&lt;TD class="xl65"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selected BaselineProduct: A1&lt;/P&gt;&lt;P&gt;Selected Products: B2, C3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chart:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="321"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="72"&gt;Product&lt;/TD&gt;&lt;TD class="xl65" width="72"&gt;Sales&lt;/TD&gt;&lt;TD class="xl65" width="105"&gt;Baseline Sales&lt;/TD&gt;&lt;TD class="xl65" width="72"&gt;Ratio&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;B2&lt;/TD&gt;&lt;TD class="xl65"&gt;500&lt;/TD&gt;&lt;TD class="xl65"&gt;1000&lt;/TD&gt;&lt;TD class="xl66"&gt;50%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;C3&lt;/TD&gt;&lt;TD class="xl65"&gt;1500&lt;/TD&gt;&lt;TD class="xl65"&gt;1000&lt;/TD&gt;&lt;TD class="xl66"&gt;100%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I've done so far, with limited success, was make a second copy of the Product field (Load distinct Product as BaselineProduct resident Sales), set it as "Always one selected", and then assorted versions of set analysis in the chart. My best effort to get the baseline value ended up being:&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Product= {$(=only(BaselineProduct))} &amp;gt;}&amp;nbsp;&amp;nbsp; Sales)&lt;/P&gt;&lt;P&gt;Which does indeed get the baseline sales correctly when Product is not a dimension. Unfortunately, when using Product as a dimension, this results in the following chart:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 321px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="72"&gt;Product&lt;/TD&gt;&lt;TD class="xl65" width="72"&gt;Sales&lt;/TD&gt;&lt;TD class="xl65" width="105"&gt;Baseline Sales&lt;/TD&gt;&lt;TD class="xl65" width="72"&gt;Ratio&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;A1&lt;/TD&gt;&lt;TD class="xl65"&gt;-&lt;/TD&gt;&lt;TD class="xl65"&gt;1000&lt;/TD&gt;&lt;TD class="xl65"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;B2&lt;/TD&gt;&lt;TD class="xl65"&gt;500&lt;/TD&gt;&lt;TD class="xl65"&gt;-&lt;/TD&gt;&lt;TD class="xl66"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;C3&lt;/TD&gt;&lt;TD class="xl65"&gt;1500&lt;/TD&gt;&lt;TD class="xl65"&gt;-&lt;/TD&gt;&lt;TD class="xl66"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is not what I had in mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd appreciate any suggestions as to how to get this done (perhaps using variables? Different set analysis? something else?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA,&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Sep 2011 14:00:28 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2011-09-13T14:00:28Z</dc:date>
    <item>
      <title>Multiple selections on same field with one acting as a baseline</title>
      <link>https://community.qlik.com/t5/QlikView/Multiple-selections-on-same-field-with-one-acting-as-a-baseline/m-p/257134#M584301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am looking for a way to allow multiple selections on the same "field". One selection is forced as a "Always one selected" and provides a baseline for comparison, while the second selection can be multiple choices. What I would like to achieve is a chart showing the selected second-selection, and the ratio between the baseline selection and the second selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, the following data:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="249"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" width="72"&gt;Product&lt;/TD&gt;&lt;TD class="xl66" width="72"&gt;Sales&lt;/TD&gt;&lt;TD class="xl66" width="105"&gt;Margin&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;A1&lt;/TD&gt;&lt;TD class="xl65"&gt;1000&lt;/TD&gt;&lt;TD class="xl65"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;B2&lt;/TD&gt;&lt;TD class="xl65"&gt;500&lt;/TD&gt;&lt;TD class="xl65"&gt;80&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;C3&lt;/TD&gt;&lt;TD class="xl65"&gt;1500&lt;/TD&gt;&lt;TD class="xl65"&gt;50&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;D4&lt;/TD&gt;&lt;TD class="xl65"&gt;100&lt;/TD&gt;&lt;TD class="xl65"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Selected BaselineProduct: A1&lt;/P&gt;&lt;P&gt;Selected Products: B2, C3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chart:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" width="321"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="72"&gt;Product&lt;/TD&gt;&lt;TD class="xl65" width="72"&gt;Sales&lt;/TD&gt;&lt;TD class="xl65" width="105"&gt;Baseline Sales&lt;/TD&gt;&lt;TD class="xl65" width="72"&gt;Ratio&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;B2&lt;/TD&gt;&lt;TD class="xl65"&gt;500&lt;/TD&gt;&lt;TD class="xl65"&gt;1000&lt;/TD&gt;&lt;TD class="xl66"&gt;50%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;C3&lt;/TD&gt;&lt;TD class="xl65"&gt;1500&lt;/TD&gt;&lt;TD class="xl65"&gt;1000&lt;/TD&gt;&lt;TD class="xl66"&gt;100%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I've done so far, with limited success, was make a second copy of the Product field (Load distinct Product as BaselineProduct resident Sales), set it as "Always one selected", and then assorted versions of set analysis in the chart. My best effort to get the baseline value ended up being:&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Product= {$(=only(BaselineProduct))} &amp;gt;}&amp;nbsp;&amp;nbsp; Sales)&lt;/P&gt;&lt;P&gt;Which does indeed get the baseline sales correctly when Product is not a dimension. Unfortunately, when using Product as a dimension, this results in the following chart:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 321px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="19" width="72"&gt;Product&lt;/TD&gt;&lt;TD class="xl65" width="72"&gt;Sales&lt;/TD&gt;&lt;TD class="xl65" width="105"&gt;Baseline Sales&lt;/TD&gt;&lt;TD class="xl65" width="72"&gt;Ratio&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;A1&lt;/TD&gt;&lt;TD class="xl65"&gt;-&lt;/TD&gt;&lt;TD class="xl65"&gt;1000&lt;/TD&gt;&lt;TD class="xl65"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;B2&lt;/TD&gt;&lt;TD class="xl65"&gt;500&lt;/TD&gt;&lt;TD class="xl65"&gt;-&lt;/TD&gt;&lt;TD class="xl66"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="19"&gt;C3&lt;/TD&gt;&lt;TD class="xl65"&gt;1500&lt;/TD&gt;&lt;TD class="xl65"&gt;-&lt;/TD&gt;&lt;TD class="xl66"&gt;-&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which is not what I had in mind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd appreciate any suggestions as to how to get this done (perhaps using variables? Different set analysis? something else?).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIA,&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Sep 2011 14:00:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Multiple-selections-on-same-field-with-one-acting-as-a-baseline/m-p/257134#M584301</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2011-09-13T14:00:28Z</dc:date>
    </item>
  </channel>
</rss>

