<?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: Need help in calculating Sales Profit using Ratio Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441306#M1163361</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attaching testing example in which I have two excel file and one qlickview file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirements also mention on pivot table blak fields &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TransactionMaster.xlsx&amp;nbsp;&amp;nbsp; - Example of Master Table&lt;/P&gt;&lt;P class="jive-attach-item" id="jive-attach-item1"&gt;TransactionDetails.xlsx - Example of Transaction Details Table&lt;/P&gt;&lt;P class="jive-attach-item" id="jive-attach-item2"&gt;QlikViewPETesting.qvw&amp;nbsp; - QlickView testing File&lt;/P&gt;&lt;P class="jive-attach-item"&gt;&lt;/P&gt;&lt;P class="jive-attach-item"&gt;As mention on QVW file : &lt;/P&gt;&lt;P class="jive-attach-item"&gt;&lt;/P&gt;&lt;P class="jive-attach-item"&gt;I would like to see below mention calculation on Sales Price AFD (After Discount) expression:&lt;/P&gt;&lt;P class="jive-attach-item"&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guys can you look into this and help to get out from my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vocher no 1 is having total 3 items but I want devide docment discount only for two items (itemtype = 'D')&amp;nbsp; &lt;BR /&gt;So to do that I am calculating &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ratio of sales % for two items&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First stock &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿ STKD0001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(6000/13000) * 100 where my sales ratio will be 46.15% &lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt; STKD0002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN id="mce_marker"&gt;&lt;/SPAN&gt;(7000/13000) * 100 where my sales ratio will be 53.85%&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;Now I have Sales ratio % so I can divide document discount:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STKD0001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500 * 46.15 / 100 where I will get discount value&amp;nbsp;&amp;nbsp; 692.25&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;STKD0002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500 * 53.85 / 100 where I will get discount value&amp;nbsp;&amp;nbsp; 807.75&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt; text-decoration: underline;"&gt;now in last Sales Vaule - Discount value will be my Sales Price after discont. &lt;/SPAN&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;I have tried to make make easy as possible for the person who likes to help me. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;Because of beginer I am not able to do above mention calculation.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Oct 2012 09:29:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-10-23T09:29:55Z</dc:date>
    <item>
      <title>Need help in calculating Sales Profit using Ratio Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441303#M1163358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new user of Qlikview and I had start working Qlikview Personal Edition (free) with test data, while generating stock transaction report I had found query:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tesing Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;Sales Master Table:&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 781px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" colspan="9" height="25" style="text-align: center;" width="781"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Sales Master&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="text-align: center;"&gt;UniqueCode&lt;/TD&gt;&lt;TD class="xl67" style="text-align: center; border-left: medium none;"&gt;DocNo&lt;/TD&gt;&lt;TD class="xl67" style="text-align: center; border-left: medium none;"&gt;DocDate&lt;/TD&gt;&lt;TD class="xl67" style="text-align: center; border-left: medium none;"&gt;ShopCode&lt;/TD&gt;&lt;TD class="xl67" style="text-align: center; border-left: medium none;"&gt;SalesManCode&lt;/TD&gt;&lt;TD class="xl67" style="text-align: center; border-left: medium none;"&gt;TotalNoOfPcs&lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none;"&gt;TotalSalesAmt &lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none;"&gt;DocDiscount &lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none;"&gt;ReceivedAmt &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="text-align: right; border-top: medium none;"&gt;355&lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;266&lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;29/09/2012&lt;/TD&gt;&lt;TD class="xl67" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;JBL&lt;/TD&gt;&lt;TD class="xl67" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;AB&lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;3&lt;/TD&gt;&lt;TD class="xl68" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30,000.00 &lt;/TD&gt;&lt;TD class="xl68" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,500.00 &lt;/TD&gt;&lt;TD class="xl68" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 28,500.00 &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt;Sales Detail Table:&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 926px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" colspan="11" height="25" style="text-align: center;" width="926"&gt;&lt;SPAN style="font-size: 12pt;"&gt;&lt;STRONG&gt;Sales Details&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="text-align: center;"&gt;UniqueCode&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none;"&gt;DocNo&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none;"&gt;Stock Code&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none;"&gt;ShopCode&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none;"&gt;SalesManCode&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none;"&gt;NoifItems&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none;"&gt;StockType&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none;"&gt;CostPrice&lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none;"&gt;SalesValue &lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none;"&gt;DocDiscount &lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none;"&gt;&lt;STRONG&gt;Profit %&lt;/STRONG&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="text-align: right; border-top: medium none;"&gt;355&lt;/TD&gt;&lt;TD class="xl66" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;266&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;D00001&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;JBL&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;AB&lt;/TD&gt;&lt;TD class="xl66" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;D&lt;/TD&gt;&lt;TD class="xl68" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp; 3,000.00 &lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9,000.00 &lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,500.00 &lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;&lt;STRONG&gt;?&lt;/STRONG&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="text-align: right; border-top: medium none;"&gt;355&lt;/TD&gt;&lt;TD class="xl66" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;266&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;D00002&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;JBL&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;AB&lt;/TD&gt;&lt;TD class="xl66" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;D&lt;/TD&gt;&lt;TD class="xl68" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp; 5,000.00 &lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 17,000.00 &lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,500.00 &lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;&lt;STRONG&gt;? &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" style="text-align: right; border-top: medium none;"&gt;355&lt;/TD&gt;&lt;TD class="xl66" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;266&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;G00001&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;JBL&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;AB&lt;/TD&gt;&lt;TD class="xl66" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl66" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;G&lt;/TD&gt;&lt;TD class="xl68" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp; 1,000.00 &lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4,000.00 &lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,500.00 &lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp; N/A&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To fetch data I had followed &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;SQL SELECT &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Method for both table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now to finish my report I would like to learn from you guys that how can:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How I can divide document discount between two items (where stocktype is 'D') &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My calcuation in excel will be like : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 620px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl66" height="20" width="73"&gt;SalesValue&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none;" width="83"&gt;DocDiscount&lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none;" width="109"&gt;&lt;STRONG&gt;SalesValue in %&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none;" width="127"&gt;&lt;STRONG&gt;ItemWiseDiscount&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl68" style="text-align: center; border-left: medium none;" width="161"&gt;&lt;STRONG&gt;SalesValueAfDiscount&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl65" style="text-align: right; border-left: medium none;" width="67"&gt;Profit %&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="text-align: right; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 9,000.00 &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;34.62&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;519.23&lt;/TD&gt;&lt;TD class="xl70" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8,480.77 &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: medium none;"&gt;&amp;nbsp; 17,000.00 &lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,500.00 &lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;65.38&lt;/TD&gt;&lt;TD align="right" class="xl69" style="border-left: medium none; border-top: medium none;"&gt;980.77&lt;/TD&gt;&lt;TD class="xl70" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16,019.23 &lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: medium none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl67" height="20" style="border-top: medium none;"&gt;&amp;nbsp; 26,000.00 &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;&lt;/TD&gt;&lt;TD class="xl66" style="border-left: medium none; border-top: medium none;"&gt;&lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1,500.00 &lt;/TD&gt;&lt;TD class="xl67" style="text-align: right; border-left: medium none; border-top: medium none;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24,500.00 &lt;/TD&gt;&lt;TD class="xl67" style="border-left: medium none; border-top: medium none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;During my testing I am finding very hard to perform calcuation of SalesValue in %, ItemWiseDiscount, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I HAD GONE THROUGH SOME POST AND FOUND THAT AGGR FUNCTION CAN HELP ME TO PRODUCE RESULT IF YES WILL ANYONE CAN GUIDE ME&amp;nbsp; HOW TO DO THAT ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AFTER POSING MESSAGE FIRST TIME I HAD FOUND THAT ABOVE MENTION TABLE IS NOT CLEAR SO I ADD EXAMPLE IN EXCEL SHEET. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS IN ADVANCE. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 18:22:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441303#M1163358</guid>
      <dc:creator />
      <dc:date>2012-10-22T18:22:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in calculating Sales Profit using Ratio Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441304#M1163359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First, you should load both tables as separate tables. Probably you should keep "UniqueCode" in both tables (as key), but remove "DocNo", "ShopCode", "SalesManCode" and "DocDiscount" from the details table. Just don't include them in the SELECT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use a chart to do the calculation. You probably want "UniqueCode" and "StockCode" as dimensions. The expression "Sum(SalesValue)/Sum(total &amp;lt;UniqueCode&amp;gt; SalesValue)" will calculate the relative part of the salesvalue within the UniqueCode. So the expression &lt;/P&gt;&lt;P&gt;"Sum(DocDiscount)*Sum(SalesValue)/Sum(total &amp;lt;UniqueCode&amp;gt; SalesValue)" will calculate the relative part of the DocDiscount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure how you want to calculate the profit (your Excel sheet wasn't clear either...) but my guess is &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(SalesValue)-Sum(CostPrice)-Sum(DocDiscount)*Sum(SalesValue)/Sum(total &amp;lt;UniqueCode&amp;gt; SalesValue)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HIC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 21:42:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441304#M1163359</guid>
      <dc:creator>hic</dc:creator>
      <dc:date>2012-10-22T21:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in calculating Sales Profit using Ratio Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441305#M1163360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First of all sorry if there is massup in excel sheet and it is creating miss understanding. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get to same page I think I should go into more details.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am preparing pivot table as chart type and trying to get my result. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On pivot I have below mention groups:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;by year,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (First Dimension )&lt;/P&gt;&lt;P&gt;by branch,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (When I expend it will show details by branch wise result)&lt;/P&gt;&lt;P&gt;by divisions,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (like branch wise other below mention group shows result)&lt;/P&gt;&lt;P&gt;by document no, (like branch wise other below mention group shows result)&lt;/P&gt;&lt;P&gt;by item code,&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I expend last last Dimension,&amp;nbsp; it should show require calculation by each individual item code (stock code).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my result I have plan to have calculations (Cost Value, Sales Value Before discont, Sales Value after discont, Profit value in amt, Profit value in % etc. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I belive what I am doing is most common requirements in bi and my problem is that I am new and because of that&amp;nbsp; I don't know how to stracture the result in qlickview. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Even if anyone know similar stracture in any example then let me know url so i can dowload and explore.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once again thanks for reply. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 04:40:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441305#M1163360</guid>
      <dc:creator />
      <dc:date>2012-10-23T04:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in calculating Sales Profit using Ratio Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441306#M1163361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am attaching testing example in which I have two excel file and one qlickview file. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirements also mention on pivot table blak fields &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TransactionMaster.xlsx&amp;nbsp;&amp;nbsp; - Example of Master Table&lt;/P&gt;&lt;P class="jive-attach-item" id="jive-attach-item1"&gt;TransactionDetails.xlsx - Example of Transaction Details Table&lt;/P&gt;&lt;P class="jive-attach-item" id="jive-attach-item2"&gt;QlikViewPETesting.qvw&amp;nbsp; - QlickView testing File&lt;/P&gt;&lt;P class="jive-attach-item"&gt;&lt;/P&gt;&lt;P class="jive-attach-item"&gt;As mention on QVW file : &lt;/P&gt;&lt;P class="jive-attach-item"&gt;&lt;/P&gt;&lt;P class="jive-attach-item"&gt;I would like to see below mention calculation on Sales Price AFD (After Discount) expression:&lt;/P&gt;&lt;P class="jive-attach-item"&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please guys can you look into this and help to get out from my issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vocher no 1 is having total 3 items but I want devide docment discount only for two items (itemtype = 'D')&amp;nbsp; &lt;BR /&gt;So to do that I am calculating &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ratio of sales % for two items&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;First stock &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿ STKD0001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;(6000/13000) * 100 where my sales ratio will be 46.15% &lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt; STKD0002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN id="mce_marker"&gt;&lt;/SPAN&gt;(7000/13000) * 100 where my sales ratio will be 53.85%&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;Now I have Sales ratio % so I can divide document discount:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STKD0001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500 * 46.15 / 100 where I will get discount value&amp;nbsp;&amp;nbsp; 692.25&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;STKD0002&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1500 * 53.85 / 100 where I will get discount value&amp;nbsp;&amp;nbsp; 807.75&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt; text-decoration: underline;"&gt;now in last Sales Vaule - Discount value will be my Sales Price after discont. &lt;/SPAN&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;A&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;I have tried to make make easy as possible for the person who likes to help me. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;Because of beginer I am not able to do above mention calculation.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 09:29:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441306#M1163361</guid>
      <dc:creator />
      <dc:date>2012-10-23T09:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in calculating Sales Profit using Ratio Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441307#M1163362</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;&amp;nbsp; Have a look at the attched Application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; You can use below expression to calulate the discount.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum(aggr(sum({&amp;lt;[Item Type] = {"D"}&amp;gt;}DocDiscount) * num(Sum({&amp;lt;[Item Type] = {"D"}&amp;gt;}[Sales Price]) / Sum({&amp;lt;[Item Type] = {"D"}&amp;gt;} total&amp;lt;LocationCode&amp;gt; [Sales Price]),'#.##0.00%'),Tran_Year,Tran_Month,VoucherNo, LocationCode,Stock_Code))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This will help you to get the discount as you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Then once you find discount, I am sure you can calculate the other KPI's too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cheers&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>Wed, 24 Oct 2012 07:01:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441307#M1163362</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2012-10-24T07:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need help in calculating Sales Profit using Ratio Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441308#M1163363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks it is working as expacted. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 17:49:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Need-help-in-calculating-Sales-Profit-using-Ratio-Analysis/m-p/441308#M1163363</guid>
      <dc:creator />
      <dc:date>2012-10-24T17:49:18Z</dc:date>
    </item>
  </channel>
</rss>

