<?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: Ratios Based on a Dimension? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038825#M349891</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, this solves the issue. Thank you for the quick response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other question, do I need to remove the 12000 account as a dimension? I noticed in playing around with the file that if you add additional dimensions (cost center, etc.), those dimensions aren't tied to the account generated by the 'Pick' function. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 21 Mar 2016 17:53:00 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-03-21T17:53:00Z</dc:date>
    <item>
      <title>Ratios Based on a Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038823#M349889</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;&lt;/P&gt;&lt;P&gt;I'm having some trouble calculating a ratio and was wondering if anyone had run into a similar issue. I've got financial (margin, revenue, etc) and operational (headcount, etc.) data that come into my data set under specific account codes. I need to generate ratios using these numbers. The problem I'm running into is that I need to use set analysis to generate the numerator and denominator, and then assign that number to a new account code. As a result, I get null values for my new ratio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To illustrate, my data comes in like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Facts:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="106" style="width: 155px; height: 88px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border: solid #9bc2e6 1.0pt; border-right: none; background: #5B9BD5; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="71"&gt;&lt;P&gt;&lt;SPAN style="color: white; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;STRONG&gt;Account&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border: solid #9bc2e6 1.0pt; border-left: none; background: #5B9BD5; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="83"&gt;&lt;P&gt;&lt;SPAN style="color: white; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;STRONG&gt;Amount&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: solid #9BC2E6 1.0pt; border-bottom: solid #9BC2E6 1.0pt; border-right: none; background: #DDEBF7; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;10000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid #9BC2E6 1.0pt; border-right: solid #9BC2E6 1.0pt; background: #DDEBF7; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="83"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;10&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: solid #9BC2E6 1.0pt; border-bottom: solid #9BC2E6 1.0pt; border-right: none; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;11000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid #9BC2E6 1.0pt; border-right: solid #9BC2E6 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="83"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;10000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: solid #9BC2E6 1.0pt; border-bottom: solid #9BC2E6 1.0pt; border-right: none; background: #DDEBF7; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;10000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid #9BC2E6 1.0pt; border-right: solid #9BC2E6 1.0pt; background: #DDEBF7; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="83"&gt;&lt;P align="right" style="text-align: right;"&gt;6&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: solid #9BC2E6 1.0pt; border-bottom: solid #9BC2E6 1.0pt; border-right: none; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;11000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid #9BC2E6 1.0pt; border-right: solid #9BC2E6 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="83"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;4000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension:&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="83" style="width: 178px; height: 82px;" width="200"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border: solid #9bc2e6 1.0pt; border-right: none; background: #5B9BD5; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="71"&gt;&lt;P&gt;&lt;SPAN style="color: white; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;STRONG&gt;Account&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border: solid #9bc2e6 1.0pt; border-left: none; background: #5B9BD5; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="103"&gt;&lt;P&gt;&lt;SPAN style="color: white; font-size: 9.0pt; font-family: 'Arial','sans-serif';"&gt;&lt;STRONG&gt;Description&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: solid #9BC2E6 1.0pt; border-bottom: solid #9BC2E6 1.0pt; border-right: none; background: #DDEBF7; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;10000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid #9BC2E6 1.0pt; border-right: solid #9BC2E6 1.0pt; background: #DDEBF7; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="103"&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;Headcount&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: solid #9BC2E6 1.0pt; border-bottom: solid #9BC2E6 1.0pt; border-right: none; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;11000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid #9BC2E6 1.0pt; border-right: solid #9BC2E6 1.0pt; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="103"&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;Expense&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: solid #9BC2E6 1.0pt; border-bottom: solid #9BC2E6 1.0pt; border-right: none; background: #DDEBF7; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="71"&gt;&lt;P align="right" style="text-align: right;"&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;12000&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD nowrap="nowrap" style="border-top: none; border-left: none; border-bottom: solid #9BC2E6 1.0pt; border-right: solid #9BC2E6 1.0pt; background: #DDEBF7; padding: 0 5.4pt 0 5.4pt;" valign="bottom" width="103"&gt;&lt;P&gt;&lt;SPAN style="font-size: 9.0pt; font-family: 'Arial','sans-serif'; color: black;"&gt;Exp/&lt;SPAN style="color: #000000; font-family: Arial, sans-serif; font-size: 12px; background-color: #ddebf7;"&gt;Headcount &lt;/SPAN&gt;Ratio&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the example above, I'd like to the result of (14000/16) to be my result for account 12000. &lt;SPAN style="font-size: 13.3333px;"&gt;Is this possible to do using my current approach, or do I need to modify my dimension table? Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;EDIT: &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I should add that my formula for the account above looks something like:&lt;/P&gt;&lt;P&gt;If&lt;SPAN style="color: red;"&gt;(&lt;/SPAN&gt;[Account]=‘12000’&lt;/P&gt;&lt;P&gt; , SUM({&amp;lt;[Account]={‘10000’)&amp;gt;} Amount) / SUM({&amp;lt;[Account]={‘11000’)&amp;gt;} Amount)&lt;/P&gt;&lt;P style="text-indent: .5in;"&gt;, SUM(Amount)&lt;SPAN style="color: red;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 17:17:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038823#M349889</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-21T17:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Ratios Based on a Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038824#M349890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like the attached&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/118860_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 17:48:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038824#M349890</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-21T17:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Ratios Based on a Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038825#M349891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, this solves the issue. Thank you for the quick response!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One other question, do I need to remove the 12000 account as a dimension? I noticed in playing around with the file that if you add additional dimensions (cost center, etc.), those dimensions aren't tied to the account generated by the 'Pick' function. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Mar 2016 17:53:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038825#M349891</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-21T17:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Ratios Based on a Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038826#M349892</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;Try like this in attached file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 03:13:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038826#M349892</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2016-03-22T03:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Ratios Based on a Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038827#M349893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's what I was looking for. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 12:08:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038827#M349893</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-22T12:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Ratios Based on a Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038828#M349894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I keep running into issues with this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, I'd like to pull the expression that's aligned with from a field in the data. I've got the formulas loaded, along with the 'Rank' field that allows me to tie the formula to a specific account. After that, I keep running into a wall trying to use either the Pick function or a variable created in the load script to generate my formula. I've been relying on the following threads for guidance:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/28978"&gt;Evaluate field values as chart expressions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/138144"&gt;Interpret field values as formulas&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/400265"&gt;Using formulas from excel in the straight table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As always, thanks for any help in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Mar 2016 19:08:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038828#M349894</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-22T19:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: Ratios Based on a Dimension?</title>
      <link>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038829#M349895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you were missing TOTAL from your expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Concatenate(Table)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;*&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;INLINE [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Account, Formula, Rank&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;12000, SUM(&lt;SPAN style="color: #ff0000;"&gt;TOTAL&lt;/SPAN&gt; {&amp;lt;Account={'10000'}&amp;gt;}Amount) / SUM(&lt;SPAN style="color: #ff0000;"&gt;TOTAL&lt;/SPAN&gt;{&amp;lt;Account={'11000'}&amp;gt;}Amount), 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;12001, SUM(&lt;SPAN style="color: #ff0000;"&gt;TOTAL&lt;/SPAN&gt;{&amp;lt;Account={'11000'}&amp;gt;}Amount) / SUM(&lt;SPAN style="color: #ff0000;"&gt;TOTAL&lt;/SPAN&gt;{&amp;lt;Account={'10000'}&amp;gt;}Amount), 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you make that fix, your expression seems to be working&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Pick(Rank,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Num($(=FieldValue('Formula',1)), '##.######'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Num($(=FieldValue('Formula',2)), '##.'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="119032" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/119032_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 00:47:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Ratios-Based-on-a-Dimension/m-p/1038829#M349895</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-23T00:47:22Z</dc:date>
    </item>
  </channel>
</rss>

