<?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 Using DISTINCT and SUM together in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141355#M893822</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;&amp;nbsp;&amp;nbsp; I am a newbie here. I am facing issue, please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have data like below, the data is not normalized so need to write some expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Project data, quarter wise. As below figure states, I have repeated data for the same quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to put expression is the chart, where the Approved budget will be the sum of the column where the quarters are distinct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help as I am really struggling with the syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/133828_Capture.JPG" style="height: 150px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator />
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Using DISTINCT and SUM together</title>
      <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141355#M893822</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;&amp;nbsp;&amp;nbsp; I am a newbie here. I am facing issue, please suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have data like below, the data is not normalized so need to write some expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have Project data, quarter wise. As below figure states, I have repeated data for the same quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to put expression is the chart, where the Approved budget will be the sum of the column where the quarters are distinct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help as I am really struggling with the syntax.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/133828_Capture.JPG" style="height: 150px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141355#M893822</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using DISTINCT and SUM together</title>
      <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141356#M893823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Moved from "Community Information" to "New to QlikView" as it is a technical topic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@ Nishant:&lt;/P&gt;&lt;P&gt;If this topic was intended for Qlik Sense, let us know and we move it there instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Aug 2016 08:57:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141356#M893823</guid>
      <dc:creator>oknotsen</dc:creator>
      <dc:date>2016-08-06T08:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using DISTINCT and SUM together</title>
      <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141357#M893824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am actualy new. to Qlikview. sO thanks for posting it to the right community &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Aug 2016 09:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141357#M893824</guid>
      <dc:creator />
      <dc:date>2016-08-06T09:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using DISTINCT and SUM together</title>
      <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141358#M893825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could just simply do like this:&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14704752465245093 jive_text_macro" jivemacro_uid="_14704752465245093" modifiedtitle="true"&gt;
&lt;P&gt;Budget:&lt;/P&gt;
&lt;P&gt;Load Distinct&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Project&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Financial_Year&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Quarter&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Approved_Budget&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Actual_Budget&lt;/P&gt;
&lt;P&gt;From Source;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case you will only get data that contains Budgets, Years and Quarter. Everything will be done in your loading state, not front end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wish something else please tell us more about your issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Aug 2016 09:23:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141358#M893825</guid>
      <dc:creator>MindaugasBacius</dc:creator>
      <dc:date>2016-08-06T09:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using DISTINCT and SUM together</title>
      <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141359#M893826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for response!&lt;/P&gt;&lt;P&gt;I would need all the data in the excel, as it would be used in different tabs in Qlinkview to show different aspects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the current tab I need financial data. To represent Total project Buget, I would need to sum() the Amount, But only the amount where the Quarter column is distinct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In other words, I need to pick only the rows DISTINCT Quarter, and then sum the Allocated_Budget amount.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Aug 2016 09:30:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141359#M893826</guid>
      <dc:creator />
      <dc:date>2016-08-06T09:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using DISTINCT and SUM together</title>
      <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141360#M893827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would agree that you should consider remodelling your data model so that your budget table does not show duplicate budget values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you can't do this, you can do this in the front end / chart expression like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum( Aggr( Only(Approved_Budget), Project_Number, Financial_Year, Quarter))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Aug 2016 09:42:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141360#M893827</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-08-06T09:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using DISTINCT and SUM together</title>
      <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141361#M893828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Even I wish to remodel, but there are some constraints which is not allowing me to &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But your solution worked for me. Thanks alot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just to understand better, the above solution created a temporary table with (Project_Number, Financial_Year, Quarter) as dimension and took the Approved_Budget. can you tel me the role of ONLY, does it takes just the first row??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Aug 2016 09:54:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141361#M893828</guid>
      <dc:creator />
      <dc:date>2016-08-06T09:54:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using DISTINCT and SUM together</title>
      <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141362#M893829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please post sample example / Data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Aug 2016 10:29:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141362#M893829</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2016-08-06T10:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using DISTINCT and SUM together</title>
      <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141363#M893830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, it will return the one and only unambiguous value in the context of the evaluation, or NULL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/2662"&gt;The Only Function&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've used the only() function to explictely express that I expect only a single unique value for budget in the context of project and year - quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your issue is resolved, then please close this thread by marking helpful / correct answers.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14806"&gt;Qlik Community Tip: Marking Replies as Correct or Helpful&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Aug 2016 11:05:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141363#M893830</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-08-06T11:05:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using DISTINCT and SUM together</title>
      <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141364#M893831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Needed one more help. Suppose I want to showcase the Aproved budget vs Exenditure. what is the best suggested way to show that?&lt;/P&gt;&lt;P&gt;I am trying through line charts but doesn't look the way i expect&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Aug 2016 18:41:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141364#M893831</guid>
      <dc:creator />
      <dc:date>2016-08-06T18:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using DISTINCT and SUM together</title>
      <link>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141365#M893832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try with a bar chart, a chart with dimension Year-Month and two expressions for Approved / Exenditure should show the data quite well. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or what is the way you expect the data to look?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Aug 2016 09:05:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-DISTINCT-and-SUM-together/m-p/1141365#M893832</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-08-07T09:05:00Z</dc:date>
    </item>
  </channel>
</rss>

