<?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: Perform calculations where expression uses dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756973#M269452</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your assumption is actually not entirely correct. It is quite easy with your current data to calculate the ratio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just add an extra expression in your chart and define it like this:&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Column(2) / Column(1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have added % formatting on the number of the new expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/74874_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to simplify the Current Assets and Current Liabilities expressions significantly and&lt;/P&gt;&lt;P&gt;make them much speedier by resorting only to Set Expressions and removing the IFs. However&lt;/P&gt;&lt;P&gt;since you specifically asked for calculation of the ratio I leave that for another time....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jan 2015 19:01:38 GMT</pubDate>
    <dc:creator>petter</dc:creator>
    <dc:date>2015-01-08T19:01:38Z</dc:date>
    <item>
      <title>Perform calculations where expression uses dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756969#M269448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if I've titled this correctly, but I'm having difficulty calculating a current ratio due to the way my data is formatted and I'm wondering if there's a workaround.&amp;nbsp; My data looks like the image below.&amp;nbsp; I have expressions which look as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Assets: &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//If the account is normally an asset account and the balance is positive, then sum the balance&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Adjusted Category]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='Current Asset' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Adjusted Category]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='Current Liabilities') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Balance&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;gt;0,&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Account Type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"Balance Sheet"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Fin Period]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; =&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Fin Period]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Balance&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,0)))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Current Liabilities:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;FABS&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//If the account is normally an asset account and the balance is positive, then sum the balance&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Adjusted Category]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='Current Asset' &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;or&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Adjusted Category]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;='Current Liabilities') &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Balance&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&amp;lt;0,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Account Type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"Balance Sheet"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Fin Period]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; =&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;max&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;total&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Fin Period]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)), &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Balance&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,0))))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Image.png" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/74861_Image.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want to do is divide current assets by current liabilities to get the current ratio, but my data doesn't facilitate this.&amp;nbsp; If I remove "adjusted category" the results disappear altogether.&amp;nbsp; Can someone let me know where I'm going wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 15:06:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756969#M269448</guid>
      <dc:creator>nsm1234567</dc:creator>
      <dc:date>2015-01-08T15:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Perform calculations where expression uses dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756970#M269449</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;Could you post an image of your table structure?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 17:23:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756970#M269449</guid>
      <dc:creator>mazacini</dc:creator>
      <dc:date>2015-01-08T17:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Perform calculations where expression uses dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756971#M269450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey There,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp; Would the below suffice?&amp;nbsp; It shows all the dimensions I'm referencing&amp;nbsp; in the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;IMG alt="Table_Image.png" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/74863_Table_Image.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 17:47:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756971#M269450</guid>
      <dc:creator>nsm1234567</dc:creator>
      <dc:date>2015-01-08T17:47:13Z</dc:date>
    </item>
    <item>
      <title>Re: Perform calculations where expression uses dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756972#M269451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you attach a sample file pls for review?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: Also why dont you just put them in a Text Box and kinda play around with alignment and cosmetics stuff. I think that might work.Cause you dont need a Table here I believe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 17:55:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756972#M269451</guid>
      <dc:creator />
      <dc:date>2015-01-08T17:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: Perform calculations where expression uses dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756973#M269452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your assumption is actually not entirely correct. It is quite easy with your current data to calculate the ratio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just add an extra expression in your chart and define it like this:&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Column(2) / Column(1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have added % formatting on the number of the new expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/74874_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is possible to simplify the Current Assets and Current Liabilities expressions significantly and&lt;/P&gt;&lt;P&gt;make them much speedier by resorting only to Set Expressions and removing the IFs. However&lt;/P&gt;&lt;P&gt;since you specifically asked for calculation of the ratio I leave that for another time....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 19:01:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756973#M269452</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-01-08T19:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Perform calculations where expression uses dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756974#M269453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Petter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response.&amp;nbsp; The crux of the issue I'm having is that none of those aggregations work for me.&amp;nbsp; I've pasted some outcomes below based on the formulas you gave to illustrate.&amp;nbsp; I've also switched totals mode to "expression total" rather than "sum of rows" as that also helps illustrate that totals aren't really being generated at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Examples.png" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/74899_Examples.png" style="width: 620px; height: 98px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 20:27:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756974#M269453</guid>
      <dc:creator>nsm1234567</dc:creator>
      <dc:date>2015-01-08T20:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: Perform calculations where expression uses dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756975#M269454</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The reason your totals doesn't calculate is that your ifs rule out any calculation on the totals row. &lt;/P&gt;&lt;P&gt;Thats is why you need to simplify or at least transform your calculations into pure Set Expressions or&lt;/P&gt;&lt;P&gt;in worst case add another If that caters for the totals row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The totals row could be detected by something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If( RowNo()=0, Sum(Column(1) , &amp;lt;the-regular-expression-for-the-other-rows&amp;gt; )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 20:33:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756975#M269454</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-01-08T20:33:47Z</dc:date>
    </item>
    <item>
      <title>Re: Perform calculations where expression uses dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756976#M269455</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the response.&amp;nbsp; I've attached an example to illustrate the issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 21:04:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756976#M269455</guid>
      <dc:creator>nsm1234567</dc:creator>
      <dc:date>2015-01-08T21:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Perform calculations where expression uses dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756977#M269456</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How would I go about replacing my expression with set analysis only?&amp;nbsp; I did a bit of experimentation with set analysis, and got as far as the below, but this doesn't replicate the result of my expression (I've also attached a sample file a bit higher up with my original object).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Adjusted Category]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"Current Asset"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"Current Liabilities"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[Account Type]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"Balance Sheet"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},&lt;BR /&gt; Period = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=Max(total([Fin Period])))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;} Balance)&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 22:06:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756977#M269456</guid>
      <dc:creator>nsm1234567</dc:creator>
      <dc:date>2015-01-08T22:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Perform calculations where expression uses dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756978#M269457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I manage to get up with the sums you request and calculate the ratio... But are you sure that this is the right&lt;/P&gt;&lt;P&gt;numbers? Have a look at the extra visualisation I have made of the contents of both assets and liabilities and&lt;/P&gt;&lt;P&gt;see if it makes sense: (I also attached the modified QlikView App)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2015-01-09 Balance.PNG" class="image-1 jive-image" src="/legacyfs/online/74932_2015-01-09 Balance.PNG" style="height: 323px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 00:03:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756978#M269457</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2015-01-09T00:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Perform calculations where expression uses dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756979#M269458</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, I only have personal edition, so cannot open your file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ould it help if you flagged the transactions with a 'Current Ratio Flag'?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would join the Adjusted Category to the BALANCES table, then drop that field from the INLFED-1 table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I would create a 'Current Ratio Flag' field:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(AC=CA,if(B&amp;gt;0,1,2),if(AC=CL,if(B&amp;gt;0,1,2),0) as [Current Ratio Flag]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(Note AC-Adjusted Category, B = Balance, CA = Current Assets, CL = Current Liabilities)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This would then flag all non CA/CL transactions as 0, all positive CA/CL as 1, and all non-positive CA/CL as 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then your formula would use Set Analysis Sum({&amp;lt;[Adjusted Category]={1}&amp;gt;}Balance)/((Sum({&amp;lt;[Adjusted Category]={1}&amp;gt;}Balance)+Sum({&amp;lt;[Adjusted Category]={2}&amp;gt;}Balance))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would that work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Jan 2015 08:35:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Perform-calculations-where-expression-uses-dimension/m-p/756979#M269458</guid>
      <dc:creator>mazacini</dc:creator>
      <dc:date>2015-01-09T08:35:57Z</dc:date>
    </item>
  </channel>
</rss>

