<?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 2 values for one field in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184148#M49151</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am using an if statement to show the total of bill amounts per month and at the top of the report there is a total for the year.&lt;BR /&gt;&lt;BR /&gt;The problem I've come across is that if there are 2 amounts for one month. I would usually want to use the 2nd amount.&lt;BR /&gt;&lt;BR /&gt;Using distinct fixes the problem but other accounts will have an incorrect total value because distinct will only take one instance of an amount.&lt;BR /&gt;&lt;BR /&gt;Eg. May 2010 - 15&lt;BR /&gt; June 2010 - 15. distinct will only let me take one of those amounts.&lt;BR /&gt;&lt;BR /&gt;The only way around this is if I was to write an if statement to somehow identify if there are 2 of the same months and to take the data in relation to the 2nd instance of the month.&lt;BR /&gt;&lt;BR /&gt;eg. Jan 2011 -20&lt;BR /&gt; Jan 2011 -25&lt;BR /&gt;my if statement would take the 2nd one.&lt;BR /&gt;&lt;BR /&gt;my code is sum(distinct bill_amount).&lt;BR /&gt;&lt;BR /&gt;if anyone can shed some light on how I would write this if statement or is it possible to use set anaylsis for this type of issue?&lt;BR /&gt;&lt;BR /&gt;Any help is much appreciated,&lt;BR /&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 28 Mar 2011 09:01:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-28T09:01:32Z</dc:date>
    <item>
      <title>2 values for one field</title>
      <link>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184148#M49151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am using an if statement to show the total of bill amounts per month and at the top of the report there is a total for the year.&lt;BR /&gt;&lt;BR /&gt;The problem I've come across is that if there are 2 amounts for one month. I would usually want to use the 2nd amount.&lt;BR /&gt;&lt;BR /&gt;Using distinct fixes the problem but other accounts will have an incorrect total value because distinct will only take one instance of an amount.&lt;BR /&gt;&lt;BR /&gt;Eg. May 2010 - 15&lt;BR /&gt; June 2010 - 15. distinct will only let me take one of those amounts.&lt;BR /&gt;&lt;BR /&gt;The only way around this is if I was to write an if statement to somehow identify if there are 2 of the same months and to take the data in relation to the 2nd instance of the month.&lt;BR /&gt;&lt;BR /&gt;eg. Jan 2011 -20&lt;BR /&gt; Jan 2011 -25&lt;BR /&gt;my if statement would take the 2nd one.&lt;BR /&gt;&lt;BR /&gt;my code is sum(distinct bill_amount).&lt;BR /&gt;&lt;BR /&gt;if anyone can shed some light on how I would write this if statement or is it possible to use set anaylsis for this type of issue?&lt;BR /&gt;&lt;BR /&gt;Any help is much appreciated,&lt;BR /&gt;thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 09:01:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184148#M49151</guid>
      <dc:creator />
      <dc:date>2011-03-28T09:01:32Z</dc:date>
    </item>
    <item>
      <title>2 values for one field</title>
      <link>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184149#M49152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you going to decide which one is the second one? By the order?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 09:18:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184149#M49152</guid>
      <dc:creator />
      <dc:date>2011-03-28T09:18:57Z</dc:date>
    </item>
    <item>
      <title>2 values for one field</title>
      <link>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184150#M49153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Iassen,&lt;BR /&gt;&lt;BR /&gt;yeah the second one by order&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 09:24:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184150#M49153</guid>
      <dc:creator />
      <dc:date>2011-03-28T09:24:02Z</dc:date>
    </item>
    <item>
      <title>2 values for one field</title>
      <link>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184151#M49154</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK, can you now share a sample of your report, so that I can give you the correct formula?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 09:36:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184151#M49154</guid>
      <dc:creator />
      <dc:date>2011-03-28T09:36:56Z</dc:date>
    </item>
    <item>
      <title>2 values for one field</title>
      <link>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184152#M49155</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Iassen, I've tried to attach a sample but it won't let me.&lt;BR /&gt;&lt;BR /&gt;All I was going to send was a qvw that used a pivot table. The table contained 2 dimensions - Account and Month. The expression was sum(distinct amount) as Total.&lt;BR /&gt;&lt;BR /&gt;This data was loaded in from a spreadsheet.&lt;BR /&gt;&lt;BR /&gt;The table looked like this:&lt;BR /&gt;&lt;STRONG&gt;Account Month Total&lt;BR /&gt; Total 2064&lt;/STRONG&gt;&lt;BR /&gt;12345 Jan 1000&lt;BR /&gt;12345 jan 1064&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does this help any?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Mar 2011 10:16:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184152#M49155</guid>
      <dc:creator />
      <dc:date>2011-03-28T10:16:10Z</dc:date>
    </item>
    <item>
      <title>2 values for one field</title>
      <link>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184153#M49156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I will need to see your raw data as well. Can you paste some of it here as well?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 08:18:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184153#M49156</guid>
      <dc:creator />
      <dc:date>2011-03-30T08:18:03Z</dc:date>
    </item>
    <item>
      <title>2 values for one field</title>
      <link>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184154#M49157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is always the highest number in each month you need, you might be able to do the following:&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;Sum(aggr(max(distinct bill_amount), month))&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;&lt;/P&gt;&lt;P style="margin:0cm 0cm 0pt;mso-layout-grid-align:none;"&gt;Although this would not work if you need to take account of credits.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2011 08:29:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/2-values-for-one-field/m-p/184154#M49157</guid>
      <dc:creator />
      <dc:date>2011-03-30T08:29:48Z</dc:date>
    </item>
  </channel>
</rss>

