<?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: calculation based on user selection in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculation-based-on-user-selection/m-p/656175#M1072493</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrian, I moved this over as per Sean's suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;Qlik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Aug 2014 19:01:06 GMT</pubDate>
    <dc:creator>Michael_Tarallo</dc:creator>
    <dc:date>2014-08-11T19:01:06Z</dc:date>
    <item>
      <title>calculation based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-based-on-user-selection/m-p/656173#M1072491</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;&lt;/P&gt;&lt;P&gt;I've got 3 time variables on my dashboard, year, month and quarter. behind the scenes I have 3 inflation tables, one for year, one for quarter and one for month. I have a calculation in a waterfall where the value you see depends on what time period the user has selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when the user selects 2014 only the figure used for the calculation comes from the year table only.&lt;/P&gt;&lt;P&gt;If they select a particular year and then a quarter, e.g 2014 Q1 then the calculation comes from the quarter table.&lt;/P&gt;&lt;P&gt;If they select 2014 and Jan, then the figure used for the calculation comes from the month table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to use something like if(Getcurrentfield)=year, perform calculation using value(s) from the year table,&lt;/P&gt;&lt;P&gt;if(Getcurrentfield)=quarter, perform calculation using value(s) from qtr table,&lt;/P&gt;&lt;P&gt;if(Getcurrentfield)=month, perform calculation using value(s) from year table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adrian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2014 13:56:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-based-on-user-selection/m-p/656173#M1072491</guid>
      <dc:creator />
      <dc:date>2014-08-11T13:56:51Z</dc:date>
    </item>
    <item>
      <title>Re: calculation based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-based-on-user-selection/m-p/656174#M1072492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would recommend placing this question in the "New to QlikView" message board.&amp;nbsp; Qlik Sense is a brand new product, and it requires a new way of thinking for this business requirement since UI variables do not exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using logic in a calculate dimension that changes based on the DISTINCT COUNT of the different time fields.&amp;nbsp; This approach works for both products.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;=&lt;STRONG&gt;IF&lt;/STRONG&gt;(&lt;STRONG&gt;COUNT&lt;/STRONG&gt;(&lt;STRONG&gt;DISTINCT&lt;/STRONG&gt; Month)=1, Year,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF&lt;/STRONG&gt;(&lt;STRONG&gt;COUNT&lt;/STRONG&gt;(&lt;STRONG&gt;DISTINCT&lt;/STRONG&gt; Quarter)=1, Quarter,&lt;/P&gt;&lt;P&gt;MonthYear))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2014 18:48:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-based-on-user-selection/m-p/656174#M1072492</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-11T18:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: calculation based on user selection</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-based-on-user-selection/m-p/656175#M1072493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adrian, I moved this over as per Sean's suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;P&gt;Qlik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2014 19:01:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-based-on-user-selection/m-p/656175#M1072493</guid>
      <dc:creator>Michael_Tarallo</dc:creator>
      <dc:date>2014-08-11T19:01:06Z</dc:date>
    </item>
  </channel>
</rss>

