<?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 Ignore Dimension for Calculated Field in same table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Ignore-Dimension-for-Calculated-Field-in-same-table/m-p/1551480#M62845</link>
    <description>&lt;P&gt;I have a Qlik Sense Table with a Dimension [Financial Year].&lt;BR /&gt;In the same table I have two calculated fields.&lt;BR /&gt;YTD = Sum all completed Months for the FY.&lt;BR /&gt;MAT = Sum the past 12 completed months.&lt;/P&gt;&lt;P&gt;Its the MAT field I am having issues with. as it reads months beyond the current FY.&lt;/P&gt;&lt;P&gt;E.g. Our FY is July 2018 to June 2019. Its March so we start at the last completed month which is Feb.&lt;/P&gt;&lt;P&gt;we need to calculate Feb 2019 back to March 2018 for the Column row FY 2019. this means I need to ignore the dimension for Financial Year to Calc the months March, April and June 2018 from the previous FY.&lt;BR /&gt;I have an Auto Generated calendar that I have marked the dates that are to be summed.&lt;BR /&gt;If(TempDate &amp;gt; date(floor(monthend(addmonths(Today(),-1)))),'MAT0',&lt;BR /&gt;If(TempDate &amp;gt; date(floor(monthend(addmonths(Today(),-13)))),'MAT1',&lt;BR /&gt;If(TempDate &amp;gt; date(floor(monthend(addmonths(Today(),-25)))),'MAT2','MAT3'))) as _fMATPeriods,&lt;/P&gt;&lt;P&gt;I have tried the following but it did not correctly give me the expected result.&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[Financial Year] = &amp;gt;} If(vButtonCurrency=1 AND [_fMATPeriods]='MAT1',[Revenue AUD Amount] ...&lt;BR /&gt;Or this&lt;BR /&gt;Sum({&amp;lt;[Financial Year] = P({1})&amp;gt;}&amp;nbsp;If(vButtonCurrency=1 AND [_fMATPeriods]='MAT1',[Revenue AUD Amount] ...&lt;/P&gt;&lt;P&gt;How do I ignore the Dimension field for the MAT Calc but not the YTD Calc?&lt;BR /&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Apr 2021 07:50:11 GMT</pubDate>
    <dc:creator>Bruce</dc:creator>
    <dc:date>2021-04-02T07:50:11Z</dc:date>
    <item>
      <title>Ignore Dimension for Calculated Field in same table</title>
      <link>https://community.qlik.com/t5/App-Development/Ignore-Dimension-for-Calculated-Field-in-same-table/m-p/1551480#M62845</link>
      <description>&lt;P&gt;I have a Qlik Sense Table with a Dimension [Financial Year].&lt;BR /&gt;In the same table I have two calculated fields.&lt;BR /&gt;YTD = Sum all completed Months for the FY.&lt;BR /&gt;MAT = Sum the past 12 completed months.&lt;/P&gt;&lt;P&gt;Its the MAT field I am having issues with. as it reads months beyond the current FY.&lt;/P&gt;&lt;P&gt;E.g. Our FY is July 2018 to June 2019. Its March so we start at the last completed month which is Feb.&lt;/P&gt;&lt;P&gt;we need to calculate Feb 2019 back to March 2018 for the Column row FY 2019. this means I need to ignore the dimension for Financial Year to Calc the months March, April and June 2018 from the previous FY.&lt;BR /&gt;I have an Auto Generated calendar that I have marked the dates that are to be summed.&lt;BR /&gt;If(TempDate &amp;gt; date(floor(monthend(addmonths(Today(),-1)))),'MAT0',&lt;BR /&gt;If(TempDate &amp;gt; date(floor(monthend(addmonths(Today(),-13)))),'MAT1',&lt;BR /&gt;If(TempDate &amp;gt; date(floor(monthend(addmonths(Today(),-25)))),'MAT2','MAT3'))) as _fMATPeriods,&lt;/P&gt;&lt;P&gt;I have tried the following but it did not correctly give me the expected result.&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;[Financial Year] = &amp;gt;} If(vButtonCurrency=1 AND [_fMATPeriods]='MAT1',[Revenue AUD Amount] ...&lt;BR /&gt;Or this&lt;BR /&gt;Sum({&amp;lt;[Financial Year] = P({1})&amp;gt;}&amp;nbsp;If(vButtonCurrency=1 AND [_fMATPeriods]='MAT1',[Revenue AUD Amount] ...&lt;/P&gt;&lt;P&gt;How do I ignore the Dimension field for the MAT Calc but not the YTD Calc?&lt;BR /&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Apr 2021 07:50:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Ignore-Dimension-for-Calculated-Field-in-same-table/m-p/1551480#M62845</guid>
      <dc:creator>Bruce</dc:creator>
      <dc:date>2021-04-02T07:50:11Z</dc:date>
    </item>
  </channel>
</rss>

