<?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 Set Analysis to filter the data based on value from standalone inline table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-to-filter-the-data-based-on-value-from-standalone/m-p/2098052#M89919</link>
    <description>&lt;P&gt;I have a fact table which contains&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[Vehicle Summary]:&lt;/P&gt;
&lt;P&gt;DATE(TRIP_DAY) as [Trip Day],&lt;BR /&gt;TRIP_MONTH as [Trip Month],&lt;BR /&gt;LEFT(TRIP_MONTH,3)&amp;amp;','&amp;amp;TRIP_YEAR as [Trip Year Month Text],&lt;BR /&gt;TRIP_YEAR as [Trip Year],&lt;BR /&gt;TRIP_YEAR_MONTH as [Trip Year Month],&lt;BR /&gt;TRIP_FISCAL_PERIOD as [Trip Fiscal Period],&lt;/P&gt;
&lt;P&gt;TRAVELLED_KM AS [Distance Travelled per day(kms)]&lt;/P&gt;
&lt;P&gt;The users want to filter the fact data by&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Current Year,&lt;BR /&gt;Last Year,&lt;BR /&gt;Current Month,&lt;BR /&gt;Last Month,&lt;BR /&gt;Current Financial Year,&lt;BR /&gt;Last Financial Year,&lt;BR /&gt;Last 3 Months,&lt;BR /&gt;Last 6 Months&lt;/P&gt;
&lt;P&gt;So I created 8 variables in the app&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Set vCurrentYear = extract(year from sysdate); //equate with yr_no from Date_Dim&lt;BR /&gt;Set vLastYear = extract(year from sysdate)-1; //equate with yr_no from Date_Dim&lt;BR /&gt;Set vCurrentMonth = to_char(trunc(sysdate,'mm'),'YYYYMM'); //equate with yr_mth_no from Date_Dim&lt;BR /&gt;Set vLastMonth = to_char(add_months(trunc(sysdate,'mm'),-1),'YYYYMM'); //equate with yr_mth_no from Date_Dim&lt;BR /&gt;Set vLast3Months = to_char(add_months(trunc(sysdate,'mm'),-3),'YYYYMM') and to_char(add_months(trunc(sysdate,'mm'),-1),'YYYYMM'); // between yr_mth_no from Date_Dim&lt;BR /&gt;Set vLast6Months = to_char(add_months(trunc(sysdate,'mm'),-6),'YYYYMM') and to_char(add_months(trunc(sysdate,'mm'),-1),'YYYYMM'); // between yr_mth_no from Date_Dim&lt;BR /&gt;Set vCurrentFY = (CASE WHEN EXTRACT(month from sysdate) &amp;lt; 7 THEN EXTRACT(year from sysdate) ELSE EXTRACT(year from sysdate)+1 END); // equate with fisc_prd_nam from Date_Dim&lt;BR /&gt;Set vLastFY = (CASE WHEN EXTRACT(month from sysdate) &amp;lt; 7 THEN EXTRACT(year from sysdate)-1 ELSE EXTRACT(year from sysdate) END); // equate with fisc_prd_nam from Date_Dim&lt;/P&gt;
&lt;P&gt;And also created an inline table with values&lt;/P&gt;
&lt;P&gt;[Period Selection]:&lt;/P&gt;
&lt;P&gt;Load * Inline &lt;BR /&gt;[&lt;BR /&gt;Selection_Period&lt;BR /&gt;Current Year,&lt;BR /&gt;Last Year,&lt;BR /&gt;Current Month,&lt;BR /&gt;Last Month,&lt;BR /&gt;Current Financial Year,&lt;BR /&gt;Last Financial Year,&lt;BR /&gt;Last 3 Months,&lt;BR /&gt;Last 6 Months&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not how shall I write the set analysis to calculate the total distance travelled based on user selection from the values in inline table ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 21:31:54 GMT</pubDate>
    <dc:creator>Abhi_WP</dc:creator>
    <dc:date>2024-11-15T21:31:54Z</dc:date>
    <item>
      <title>Set Analysis to filter the data based on value from standalone inline table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-to-filter-the-data-based-on-value-from-standalone/m-p/2098052#M89919</link>
      <description>&lt;P&gt;I have a fact table which contains&amp;nbsp;&lt;/P&gt;
&lt;P&gt;[Vehicle Summary]:&lt;/P&gt;
&lt;P&gt;DATE(TRIP_DAY) as [Trip Day],&lt;BR /&gt;TRIP_MONTH as [Trip Month],&lt;BR /&gt;LEFT(TRIP_MONTH,3)&amp;amp;','&amp;amp;TRIP_YEAR as [Trip Year Month Text],&lt;BR /&gt;TRIP_YEAR as [Trip Year],&lt;BR /&gt;TRIP_YEAR_MONTH as [Trip Year Month],&lt;BR /&gt;TRIP_FISCAL_PERIOD as [Trip Fiscal Period],&lt;/P&gt;
&lt;P&gt;TRAVELLED_KM AS [Distance Travelled per day(kms)]&lt;/P&gt;
&lt;P&gt;The users want to filter the fact data by&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Current Year,&lt;BR /&gt;Last Year,&lt;BR /&gt;Current Month,&lt;BR /&gt;Last Month,&lt;BR /&gt;Current Financial Year,&lt;BR /&gt;Last Financial Year,&lt;BR /&gt;Last 3 Months,&lt;BR /&gt;Last 6 Months&lt;/P&gt;
&lt;P&gt;So I created 8 variables in the app&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Set vCurrentYear = extract(year from sysdate); //equate with yr_no from Date_Dim&lt;BR /&gt;Set vLastYear = extract(year from sysdate)-1; //equate with yr_no from Date_Dim&lt;BR /&gt;Set vCurrentMonth = to_char(trunc(sysdate,'mm'),'YYYYMM'); //equate with yr_mth_no from Date_Dim&lt;BR /&gt;Set vLastMonth = to_char(add_months(trunc(sysdate,'mm'),-1),'YYYYMM'); //equate with yr_mth_no from Date_Dim&lt;BR /&gt;Set vLast3Months = to_char(add_months(trunc(sysdate,'mm'),-3),'YYYYMM') and to_char(add_months(trunc(sysdate,'mm'),-1),'YYYYMM'); // between yr_mth_no from Date_Dim&lt;BR /&gt;Set vLast6Months = to_char(add_months(trunc(sysdate,'mm'),-6),'YYYYMM') and to_char(add_months(trunc(sysdate,'mm'),-1),'YYYYMM'); // between yr_mth_no from Date_Dim&lt;BR /&gt;Set vCurrentFY = (CASE WHEN EXTRACT(month from sysdate) &amp;lt; 7 THEN EXTRACT(year from sysdate) ELSE EXTRACT(year from sysdate)+1 END); // equate with fisc_prd_nam from Date_Dim&lt;BR /&gt;Set vLastFY = (CASE WHEN EXTRACT(month from sysdate) &amp;lt; 7 THEN EXTRACT(year from sysdate)-1 ELSE EXTRACT(year from sysdate) END); // equate with fisc_prd_nam from Date_Dim&lt;/P&gt;
&lt;P&gt;And also created an inline table with values&lt;/P&gt;
&lt;P&gt;[Period Selection]:&lt;/P&gt;
&lt;P&gt;Load * Inline &lt;BR /&gt;[&lt;BR /&gt;Selection_Period&lt;BR /&gt;Current Year,&lt;BR /&gt;Last Year,&lt;BR /&gt;Current Month,&lt;BR /&gt;Last Month,&lt;BR /&gt;Current Financial Year,&lt;BR /&gt;Last Financial Year,&lt;BR /&gt;Last 3 Months,&lt;BR /&gt;Last 6 Months&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not how shall I write the set analysis to calculate the total distance travelled based on user selection from the values in inline table ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 21:31:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-to-filter-the-data-based-on-value-from-standalone/m-p/2098052#M89919</guid>
      <dc:creator>Abhi_WP</dc:creator>
      <dc:date>2024-11-15T21:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis to filter the data based on value from standalone inline table</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-to-filter-the-data-based-on-value-from-standalone/m-p/2098076#M89920</link>
      <description>&lt;P&gt;Just use Flags !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;refer this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Member-Articles/Period-Presets-Compare-Periods-on-the-fly/ta-p/1486371" target="_blank"&gt;https://community.qlik.com/t5/Member-Articles/Period-Presets-Compare-Periods-on-the-fly/ta-p/1486371&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Jul 2023 03:32:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-to-filter-the-data-based-on-value-from-standalone/m-p/2098076#M89920</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2023-07-28T03:32:25Z</dc:date>
    </item>
  </channel>
</rss>

