<?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: Selecting a single value in a table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Selecting-a-single-value-in-a-table/m-p/455439#M169998</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;Assuming:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;=Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd1) ) } &amp;gt; } unit_cost) as Column1&lt;/LI&gt;&lt;LI&gt;=Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd2) ) } &amp;gt; } unit_cost) as Column2&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=(Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd2) ) } &amp;gt; } unit_cost) )-(Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd1) ) } &amp;gt; } unit_cost))/(Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd1) ) } &amp;gt; } unit_cost))&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Rebeca&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 15 Apr 2013 16:27:08 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-04-15T16:27:08Z</dc:date>
    <item>
      <title>Selecting a single value in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-a-single-value-in-a-table/m-p/455438#M169997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello QlikView Community, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pivot table where I want to analyze the cost of different items, and their variations in time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data is made up by item code, cost code and unit cost, respetively (item_cd, cost_cd, unit_cost).&lt;/P&gt;&lt;P&gt;Each there is only 1 unit_cost for each item_cd, cost_cd combination.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm having troubles creating an expression in the Properties of the pivot table where the dimension is the item_cd the columns containing the data are 2 columns representing 2 different cost_cd (defined by some input variable) and the 3rd column would be the % of variation between these 2 columns, taking the 1st column as base.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The input variables are vCost_cd1 and vCost_cd2, defining the 2 different cost_cd of each item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expressions are the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;=Only ( {$&amp;lt;cost_cd = {$(#vCost_cd1)}&amp;gt;} unit_cost)&lt;/LI&gt;&lt;LI&gt;=Only ( {$&amp;lt;cost_cd = {$(#vCost_cd2)}&amp;gt;} unit_cost)&lt;/LI&gt;&lt;LI&gt;=(column(2)-column(1))/(column(1))&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alternatively I also tried a double Only function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;=Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd1) ) } &amp;gt; } unit_cost)&lt;/LI&gt;&lt;LI&gt;=Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd2) ) } &amp;gt; } unit_cost)&lt;/LI&gt;&lt;LI&gt;=(column(2)-column(1))/(column(1))&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both of these attempts return an empty value in the pivot table. These are some solutions I came up after researching some of these functions in the community forum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I put only "unit_cost" in the Expression and open a Selection Windows and select the cost_cd there, it returns the correct unit_cost for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 15:06:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-a-single-value-in-a-table/m-p/455438#M169997</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-15T15:06:27Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting a single value in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-a-single-value-in-a-table/m-p/455439#M169998</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;Assuming:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;=Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd1) ) } &amp;gt; } unit_cost) as Column1&lt;/LI&gt;&lt;LI&gt;=Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd2) ) } &amp;gt; } unit_cost) as Column2&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=(Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd2) ) } &amp;gt; } unit_cost) )-(Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd1) ) } &amp;gt; } unit_cost))/(Only ( {$&amp;lt; cost_cd = {$ ( =Only(vCost_cd1) ) } &amp;gt; } unit_cost))&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;Rebeca&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 16:27:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-a-single-value-in-a-table/m-p/455439#M169998</guid>
      <dc:creator />
      <dc:date>2013-04-15T16:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting a single value in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-a-single-value-in-a-table/m-p/455440#M169999</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rebeca, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem isn't on the 3rd column, the problem is on the first 2 columns, which do not show the data in them.&lt;/P&gt;&lt;P&gt;I don't know the correct expression to make them show the unit_cost, having the cost_cd as a condition.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I appreciate the reply anyway! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 16:40:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-a-single-value-in-a-table/m-p/455440#M169999</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-04-15T16:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Selecting a single value in a table</title>
      <link>https://community.qlik.com/t5/QlikView/Selecting-a-single-value-in-a-table/m-p/455441#M170000</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;&amp;nbsp;&amp;nbsp;&amp;nbsp; If there is only 1 unit_cost for each item_cd, cost_cd combination, you can use "Sum" instead of the Only.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Apr 2013 18:36:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Selecting-a-single-value-in-a-table/m-p/455441#M170000</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2013-04-15T18:36:41Z</dc:date>
    </item>
  </channel>
</rss>

