<?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: Problem calculating margin in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220247#M622941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That sounds great! Would you mind sharing how I can go about using such an expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jan 2017 22:48:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-01-09T22:48:20Z</dc:date>
    <item>
      <title>Problem calculating margin</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220242#M622935</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 want to calculate the margin for a product sold (all products really) but I don't really get how I go about it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what I've gathered I should do a calculation similar to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(SalesPrice * Amount) * (1-rebate) - (SalesCost * Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but where do i do this? all of the listed stuff is in one table (table A) except for SalesCost which is in another table (Table B)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All and any thoughts are appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 22:07:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220242#M622935</guid>
      <dc:creator />
      <dc:date>2017-01-09T22:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calculating margin</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220243#M622936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to avoid opening more than one thread for the same requirement. Kindly share some raw data or a sample application to see how your data model looks like.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/245655"&gt;Calculate margin in an expression?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 22:24:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220243#M622936</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-09T22:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calculating margin</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220244#M622937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah I just thought of the other one after already posting this one, and figured that they were a bit different at least, sorry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked through this: &lt;A href="https://community.qlik.com/docs/DOC-1290"&gt;Preparing examples for Upload - Reduction and Data Scrambling&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if I scramble the data, will it remain scrambled? I need it the way it is know...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what do you mean by raw data? Tables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 22:39:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220244#M622937</guid>
      <dc:creator />
      <dc:date>2017-01-09T22:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calculating margin</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220245#M622938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it will remain scrambled. and by raw data I meant few rows in an Excel file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 22:46:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220245#M622938</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-01-09T22:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calculating margin</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220246#M622940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are doing the calculation in a chart expression, it does not matter that the fields are in different tables. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 22:47:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220246#M622940</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2017-01-09T22:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calculating margin</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220247#M622941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That sounds great! Would you mind sharing how I can go about using such an expression?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 22:48:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220247#M622941</guid>
      <dc:creator />
      <dc:date>2017-01-09T22:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calculating margin</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220248#M622943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's not so good then... OK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 22:49:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220248#M622943</guid>
      <dc:creator />
      <dc:date>2017-01-09T22:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calculating margin</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220249#M622945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You would use it in a chart, such as a bar chart or a straight table. &lt;/P&gt;&lt;P&gt;1. Add one or more dimension fields ot the chart, for example, "Region" or "Product".&lt;/P&gt;&lt;P&gt;2. Add your calculation as an expression, wrapped by an aggregation function such as "sum()". For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;(SalesPrice * Amount) * (1-rebate) - (SalesCost * Amount)&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 22:52:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220249#M622945</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2017-01-09T22:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calculating margin</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220250#M622947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EDIT: When I replaced the " - " between the first part of the expression and the second with " / " it worked out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT 2: The stuff mentioned in the above edit didn't do anything but confuse me further... If anyone has an idea of how I can calculate my profit margins in percentages I would gladly take your advice&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That gave a very strange looking bar chart!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to give me each individual profit margin per product, correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would want it shown as total sales margin percentage if that makes any sense?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry if these questions seem stupid, I'm still trying to learn.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jan 2017 23:03:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220250#M622947</guid>
      <dc:creator />
      <dc:date>2017-01-09T23:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem calculating margin</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220251#M622949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure re the specifics of your formula without seeing your data. If you upload a sample qvw with scrambled data, yes, the data will remain scrambled. Don't scramble the numeric fields. Just scramble the identifying text fields.&amp;nbsp; You don't need to upload the entire dataset, just enough to let us see some sample data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to see just the overall margin, then either:&lt;/P&gt;&lt;P&gt;1. Don't use a dimension in a straight table chart.&lt;/P&gt;&lt;P&gt;2. Use your expression in a text object. In this case you will need to use the num() function to format the results. Like:&lt;/P&gt;&lt;P&gt;=num(sum(your formula), '#.00%')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nothing wrong with asking newbie questions here, but I'm wondering if you have done any introductory training for QV? A good place to start is the intro video series at &lt;A href="https://community.qlik.com/docs/DOC-1986"&gt;New to QlikView Videos&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When you are ready to dive deeper, I can recommend the book "QlikView Your Business" by Oleg Troyansky.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://masterssummit.com" rel="nofollow" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://qlikviewcookbook.com" rel="nofollow" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2017 16:46:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-calculating-margin/m-p/1220251#M622949</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2017-01-10T16:46:40Z</dc:date>
    </item>
  </channel>
</rss>

