<?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: Return a value based on field's value from a different alternate state in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541111#M508622</link>
    <description>Nice to meet you too Jamie.</description>
    <pubDate>Thu, 07 Feb 2019 16:35:24 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-02-07T16:35:24Z</dc:date>
    <item>
      <title>Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1540739#M508611</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;appreciate your assistance&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Current State:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have a table of transactions per supplier per quarter, as described below:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Quarter&lt;/TD&gt;&lt;TD&gt;Transaction Date&lt;/TD&gt;&lt;TD&gt;Supplier Code&lt;/TD&gt;&lt;TD&gt;Item Number&lt;/TD&gt;&lt;TD&gt;Cost ($)&lt;/TD&gt;&lt;TD&gt;Last Transaction of the Quarter&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q1'18&lt;/TD&gt;&lt;TD&gt;24/07/18&lt;/TD&gt;&lt;TD&gt;Supplier 1&lt;/TD&gt;&lt;TD&gt;AAAA&lt;/TD&gt;&lt;TD&gt;$10,235.17&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;Q1'18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;26/07/18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;Supplier 2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;AAAA&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;$8,920.00&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q2'18&lt;/TD&gt;&lt;TD&gt;24/10/18&lt;/TD&gt;&lt;TD&gt;Supplier 2&lt;/TD&gt;&lt;TD&gt;AAAA&lt;/TD&gt;&lt;TD&gt;$8,920.00&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;Q2'18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;25/10/18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;Supplier 1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;AAAA&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;$9,911.81&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The green lines are the last transactions per quarter (with no reference to supplier).&lt;/P&gt;&lt;P&gt;I use two alternate states to show the last transactions per&amp;nbsp;quarter, so when the user choose Q1'18 in [alternate state 1]&lt;/P&gt;&lt;P&gt;&amp;nbsp;and Q2'18 in&amp;nbsp;&lt;SPAN&gt;[alternate state 2] he will get the two green lines as a result.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Challenge:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Knowing that the last transaction for Q2'18&amp;nbsp;in&amp;nbsp;[alternate state 2]&amp;nbsp; is from Supplier 1, I&amp;nbsp;wish to&amp;nbsp;find the last transaction for&amp;nbsp;Supplier 1 for&amp;nbsp;Q1'18 in [alternate state 1].&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;meaning, in the example the result will be the transaction marked in&amp;nbsp;blue.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Quarter&lt;/TD&gt;&lt;TD&gt;Transaction Date&lt;/TD&gt;&lt;TD&gt;Supplier Code&lt;/TD&gt;&lt;TD&gt;Item Number&lt;/TD&gt;&lt;TD&gt;Cost ($)&lt;/TD&gt;&lt;TD&gt;Last Transaction of the Quarter&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q1&lt;FONT color="#0000FF"&gt;'18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;24/07/18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;Supplier 1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;AAAA&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;$10,235.17&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#0000FF"&gt;0&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;Q1'18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;26/07/18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;Supplier 2&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;AAAA&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;$8,920.00&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Q2'18&lt;/TD&gt;&lt;TD&gt;24/10/18&lt;/TD&gt;&lt;TD&gt;Supplier 2&lt;/TD&gt;&lt;TD&gt;AAAA&lt;/TD&gt;&lt;TD&gt;$8,920.00&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;Q2'18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;25/10/18&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;Supplier 1&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;AAAA&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;$9,911.81&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;1&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;End Result:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;The marked green calculation are available in my solution what I'm missing is the calculation described above marked in red&lt;/P&gt;&lt;P&gt;When&amp;nbsp;I choose a specific item it works, but when no item is selected it seems that its not calculated properly&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Item Number&lt;/TD&gt;&lt;TD&gt;Alternate State 1 Transaction Cost&lt;/TD&gt;&lt;TD&gt;Alternate State 2 Transaction Cost&lt;/TD&gt;&lt;TD&gt;Alternate State 2 Supplier Code in Alternate State 1 Quarter&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;AAAA&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;$8,920.00&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;$9,911.81&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;$10,235.17&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BBBB&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;$7,920.00&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#008000"&gt;$9,911.81&lt;/FONT&gt;&lt;/TD&gt;&lt;TD&gt;&lt;FONT color="#FF0000"&gt;$8,235.17&lt;/FONT&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope to find a helper : )&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Amir&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:31:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1540739#M508611</guid>
      <dc:creator>amirkachlon</dc:creator>
      <dc:date>2024-11-16T04:31:56Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1540908#M508612</link>
      <description>&lt;P&gt;It will be easier to help if you are able to provide a sample qvw where we can see what you have and use that to test it out. Are you able to share a sample qvw file?&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 13:29:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1540908#M508612</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-07T13:29:49Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541087#M508613</link>
      <description>&lt;P&gt;Hi Amir!&lt;/P&gt;&lt;P&gt;Since my solution is harder being explained than being showed, I refer you to the attached document. Hope it helps! (I also hope to have undertood you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; )&lt;/P&gt;&lt;P&gt;Bests,&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:02:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541087#M508613</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-02-07T16:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541097#M508614</link>
      <description>&lt;P&gt;&lt;STRIKE&gt;When I opened up your dashboard I see this&lt;/STRIKE&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRIKE&gt;Isn't this what you mentioned you wanted? What is wrong with the output we see?&lt;/STRIKE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:24:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541097#M508614</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-07T16:24:58Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541101#M508615</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;When I opened up your dashboard I see this&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 596px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/5456i7F2E40F1F09480A4/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;Hi Sunny. This is my solution to Amir's problem, not a data sample from Amir.&amp;nbsp;&lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://community.qlik.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt;&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:21:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541101#M508615</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-02-07T16:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541103#M508618</link>
      <description>My bad, I feel embarrassed. Sorry for not realizing that you are a different person.</description>
      <pubDate>Thu, 07 Feb 2019 16:25:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541103#M508618</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-07T16:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541104#M508621</link>
      <description>&lt;P&gt;Hahahaha no problem Sunny. Nice to meet you, by the way.&lt;/P&gt;&lt;P&gt;Jaime.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 16:28:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541104#M508621</guid>
      <dc:creator>jaibau1993</dc:creator>
      <dc:date>2019-02-07T16:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541111#M508622</link>
      <description>Nice to meet you too Jamie.</description>
      <pubDate>Thu, 07 Feb 2019 16:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541111#M508622</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-07T16:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541992#M508623</link>
      <description>&lt;P&gt;hi Jamie,&lt;/P&gt;&lt;P&gt;Thanks for your reply !&lt;/P&gt;&lt;P&gt;Like i mentioned it works great for one item, once you have more than one item the "vlookup" doesnt work properly.&lt;/P&gt;&lt;P&gt;please see attached your solution with another item BBBB, to show the issue.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amir&lt;/P&gt;</description>
      <pubDate>Sun, 10 Feb 2019 10:06:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541992#M508623</guid>
      <dc:creator>amirkachlon</dc:creator>
      <dc:date>2019-02-10T10:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541993#M508624</link>
      <description>Hi Sunny,&lt;BR /&gt;&lt;BR /&gt;Thanks in your interest in solving my issue.&lt;BR /&gt;please use the file i attached below the one Jamie kindly created, added a bit more data&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Amir</description>
      <pubDate>Sun, 10 Feb 2019 10:08:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1541993#M508624</guid>
      <dc:creator>amirkachlon</dc:creator>
      <dc:date>2019-02-10T10:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1542299#M508625</link>
      <description>&lt;P&gt;Try this expression&lt;/P&gt;&lt;PRE&gt;=Sum({&amp;lt;Quarter = Alt1:: Quarter, Meh = {0}&amp;gt;} Aggr(&lt;BR /&gt;  If(Supplier = Only(TOTAL &amp;lt;Product&amp;gt; Aggr(If(Date = Max(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;Quarter = Alt2::Quarter&amp;gt;} Date), Supplier), Product, Date))&lt;BR /&gt;  , Sum(Amount))&lt;BR /&gt;, Product, Supplier, Date))&lt;/PRE&gt;</description>
      <pubDate>Mon, 11 Feb 2019 12:38:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1542299#M508625</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-02-11T12:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Return a value based on field's value from a different alternate state</title>
      <link>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1553653#M508626</link>
      <description>Great, what i was missing is the use of the total by product. Great solution thanks</description>
      <pubDate>Thu, 07 Mar 2019 14:10:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-a-value-based-on-field-s-value-from-a-different-alternate/m-p/1553653#M508626</guid>
      <dc:creator>amirkachlon</dc:creator>
      <dc:date>2019-03-07T14:10:16Z</dc:date>
    </item>
  </channel>
</rss>

