<?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: A ratio as a calculated dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/A-ratio-as-a-calculated-dimension/m-p/1263245#M518514</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to create a calculated dimension &lt;/P&gt;&lt;P&gt;the will go something like this&lt;/P&gt;&lt;P&gt;num(subfield(class(aggr(&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(SUM({&amp;lt;%Date = {"&amp;gt;=$(=MINSTRING({Periode_1}%Date))&amp;lt;=$(=MAXSTRING({Periode_2}%Date))"}&amp;gt;}[Revenue])&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;- SUM({&amp;lt;%Date = {"&amp;gt;=$(=MINSTRING({Periode_1}%Date))&amp;lt;=$(=MAXSTRING({Periode_2}%Date))"}&amp;gt;}[Costs]))&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;/SUM({&amp;lt;%Date = {"&amp;gt;=$(=MINSTRING({Periode_1}%Date))&amp;lt;=$(=MAXSTRING({Periode_2}%Date))"}&amp;gt;}[Revenue]),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;[ContractNo]),0.1),'&amp;lt;',1),'#,##0%')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and use as expression your expression for counting contracts from above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Nov 2016 21:32:15 GMT</pubDate>
    <dc:creator>lironbaram</dc:creator>
    <dc:date>2016-11-16T21:32:15Z</dc:date>
    <item>
      <title>A ratio as a calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/A-ratio-as-a-calculated-dimension/m-p/1263244#M518512</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 have a lot of data, Costs and revenues. Together they make margin. What I want is to make a barchart with in the X-axes a categorised margin and in the Y-axis the number of contracts. it is like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Knipsel.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/144089_Knipsel.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;My epression for the margin is like this:&lt;/P&gt;&lt;P&gt;(SUM({&amp;lt;%Date = {"&amp;gt;=$(=MINSTRING({Periode_1}%Date))&amp;lt;=$(=MAXSTRING({Periode_2}%Date))"}&amp;gt;}[Revenue]) &lt;/P&gt;&lt;P&gt;- SUM({&amp;lt;%Date = {"&amp;gt;=$(=MINSTRING({Periode_1}%Date))&amp;lt;=$(=MAXSTRING({Periode_2}%Date))"}&amp;gt;}[Costs]))&lt;/P&gt;&lt;P&gt;/SUM({&amp;lt;%Date = {"&amp;gt;=$(=MINSTRING({Periode_1}%Date))&amp;lt;=$(=MAXSTRING({Periode_2}%Date))"}&amp;gt;}[Revenue])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression for the number of contracts is just:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;COUNT({&amp;lt;%Date = {"&amp;gt;=$(=MINSTRING({Periode_1}%Date))&amp;lt;=$(=MAXSTRING({Periode_2}%Date))"}&amp;gt;}DISTINCT [ContractNo])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Can anyone bring me in the right direction??&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Halmar&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 21:03:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-ratio-as-a-calculated-dimension/m-p/1263244#M518512</guid>
      <dc:creator>qlikhalmar</dc:creator>
      <dc:date>2016-11-16T21:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: A ratio as a calculated dimension</title>
      <link>https://community.qlik.com/t5/QlikView/A-ratio-as-a-calculated-dimension/m-p/1263245#M518514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you need to create a calculated dimension &lt;/P&gt;&lt;P&gt;the will go something like this&lt;/P&gt;&lt;P&gt;num(subfield(class(aggr(&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(SUM({&amp;lt;%Date = {"&amp;gt;=$(=MINSTRING({Periode_1}%Date))&amp;lt;=$(=MAXSTRING({Periode_2}%Date))"}&amp;gt;}[Revenue])&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;- SUM({&amp;lt;%Date = {"&amp;gt;=$(=MINSTRING({Periode_1}%Date))&amp;lt;=$(=MAXSTRING({Periode_2}%Date))"}&amp;gt;}[Costs]))&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;/SUM({&amp;lt;%Date = {"&amp;gt;=$(=MINSTRING({Periode_1}%Date))&amp;lt;=$(=MAXSTRING({Periode_2}%Date))"}&amp;gt;}[Revenue]),&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;[ContractNo]),0.1),'&amp;lt;',1),'#,##0%')&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and use as expression your expression for counting contracts from above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Nov 2016 21:32:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/A-ratio-as-a-calculated-dimension/m-p/1263245#M518514</guid>
      <dc:creator>lironbaram</dc:creator>
      <dc:date>2016-11-16T21:32:15Z</dc:date>
    </item>
  </channel>
</rss>

