<?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 Pivot Table - How to create calculated measures at summary level? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Pivot-Table-How-to-create-calculated-measures-at-summary-level/m-p/2152066#M93309</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am trying to replicate the following pivot table which is in Excel into Qlik Sense.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Excel&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="satya_s_2-1702390535493.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125250iA856155790FBA48A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="satya_s_2-1702390535493.png" alt="satya_s_2-1702390535493.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Qlik Sense - Pivot Table&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="satya_s_3-1702390746661.png" style="width: 450px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125252iA6D89ACF888E07B3/image-dimensions/450x103?v=v2" width="450" height="103" role="button" title="satya_s_3-1702390746661.png" alt="satya_s_3-1702390746661.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I am not sure how to create the TNM and TNM% within the pivot table in order to replicate the same format as in excel. I need some direction on how to create these calculated measures which will display the data in the same format as excel:-&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TNM&lt;/STRONG&gt; = (Sum of TRAFFIC MARGIN-Sum of ACTUAL_RETAIL_CARR)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TNM %&lt;/STRONG&gt; =&amp;nbsp;(Sum of TRAFFIC MARGIN-Sum of ACTUAL_RETAIL_CARR)/Sum of AMOUNT&lt;/P&gt;
&lt;P&gt;I am using SQL to extract the data from Oracle database. I have hard coded 'TNM' as Traffic Type and created a calculated measure but can't get the same format as excel&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions please?&lt;/P&gt;
&lt;P&gt;If anyone has done something similar then please share your example.&lt;/P&gt;
&lt;P&gt;Thanks !!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 12 Dec 2023 14:37:02 GMT</pubDate>
    <dc:creator>satya_s</dc:creator>
    <dc:date>2023-12-12T14:37:02Z</dc:date>
    <item>
      <title>Pivot Table - How to create calculated measures at summary level?</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-Table-How-to-create-calculated-measures-at-summary-level/m-p/2152066#M93309</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I am trying to replicate the following pivot table which is in Excel into Qlik Sense.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Excel&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="satya_s_2-1702390535493.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125250iA856155790FBA48A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="satya_s_2-1702390535493.png" alt="satya_s_2-1702390535493.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Qlik Sense - Pivot Table&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="satya_s_3-1702390746661.png" style="width: 450px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125252iA6D89ACF888E07B3/image-dimensions/450x103?v=v2" width="450" height="103" role="button" title="satya_s_3-1702390746661.png" alt="satya_s_3-1702390746661.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I am not sure how to create the TNM and TNM% within the pivot table in order to replicate the same format as in excel. I need some direction on how to create these calculated measures which will display the data in the same format as excel:-&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TNM&lt;/STRONG&gt; = (Sum of TRAFFIC MARGIN-Sum of ACTUAL_RETAIL_CARR)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;TNM %&lt;/STRONG&gt; =&amp;nbsp;(Sum of TRAFFIC MARGIN-Sum of ACTUAL_RETAIL_CARR)/Sum of AMOUNT&lt;/P&gt;
&lt;P&gt;I am using SQL to extract the data from Oracle database. I have hard coded 'TNM' as Traffic Type and created a calculated measure but can't get the same format as excel&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions please?&lt;/P&gt;
&lt;P&gt;If anyone has done something similar then please share your example.&lt;/P&gt;
&lt;P&gt;Thanks !!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 14:37:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-Table-How-to-create-calculated-measures-at-summary-level/m-p/2152066#M93309</guid>
      <dc:creator>satya_s</dc:creator>
      <dc:date>2023-12-12T14:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table - How to create calculated measures at summary level?</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-Table-How-to-create-calculated-measures-at-summary-level/m-p/2152073#M93310</link>
      <description>&lt;P&gt;You can format the data explicitly within the measure, e.g.&lt;/P&gt;
&lt;P&gt;If(Dimension = 'SomeValue',Num(Sum(Field),'#,##0'),&lt;/P&gt;
&lt;P&gt;if(Dimension = 'SomeOtherValue',Num(Sum(Field)/Sum(Field2),'#,##0.00%')))&lt;/P&gt;
&lt;P&gt;Note that you will need to set the format to Auto so Qlik doesn't override these formats with something else.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 14:42:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-Table-How-to-create-calculated-measures-at-summary-level/m-p/2152073#M93310</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2023-12-12T14:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Pivot Table - How to create calculated measures at summary level?</title>
      <link>https://community.qlik.com/t5/App-Development/Pivot-Table-How-to-create-calculated-measures-at-summary-level/m-p/2152197#M93321</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Thanks for your reply.&lt;/P&gt;
&lt;P&gt;Sorry, I am not clear.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I can create a new calculated measure but how would I get a summary row which shows 'TNM' with the calculated values? Do you have an pivot table example in similar format where the calculated dimension and measure is outside the pivot.&lt;/P&gt;
&lt;P&gt;I tried to create a calculated measure within the SQL but the issue was that for the 'TNM' row, it is displaying all the other measures ( Traffic Margin, Amount etc.) which is not what I am looking for. I just need 1 row at the end showing the 'TNM' calculated values.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="satya_s_0-1702405844932.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125285iE68D115EBBA6E83F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="satya_s_0-1702405844932.png" alt="satya_s_0-1702405844932.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks !!&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2023 18:31:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Pivot-Table-How-to-create-calculated-measures-at-summary-level/m-p/2152197#M93321</guid>
      <dc:creator>satya_s</dc:creator>
      <dc:date>2023-12-12T18:31:52Z</dc:date>
    </item>
  </channel>
</rss>

