<?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 How to hide a measure based on Calc condition in a vizlib report in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-hide-a-measure-based-on-Calc-condition-in-a-vizlib-report/m-p/1826147#M67933</link>
    <description>&lt;P&gt;I am currently using a Vizlib Finance report to create a P&amp;amp;L.&amp;nbsp; We have grouped the measures for MTD &amp;amp; YTD using this formula so that we only have to create 7 columns and not 14 individual columns which creates a strain on calculations and the system.&amp;nbsp; The below formula is in my Dimensions&lt;/P&gt;&lt;P&gt;=if([Period Category]='MTD' or&amp;nbsp; [Period Category]='YTD',[Period Category])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example, the following is part of my measure calculation for my measure&lt;/P&gt;&lt;P&gt;Pick([$(=only(%Acct_Report))],&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Calc 1 in excel file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num(Sum({$&amp;lt;SCENARIO_ANCESTOR_ID = {$(=vActual)},LOB_ANCESTOR_ID={[$(=only(%Acct_Report_LOB))]},&lt;FONT color="#FF0000"&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;R&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;EFERENCE_PERIOD = {'SEQ MTD','PY YTD'&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/FONT&gt;}&amp;gt;}AMOUNT)/1000,[$(=only(%Acct_Report_formatcode))]),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' ',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //3&lt;/P&gt;&lt;P&gt;Num(&lt;BR /&gt;(Sum({$&amp;lt;SCENARIO_ANCESTOR_ID={$(=vActual)},LOB_ANCESTOR_ID={[$(=only(%Acct_Report_LOB))]},ACCOUNT_ANCESTOR_ID = {'4000'},&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;REFERENCE_PERIOD = {'SEQ MTD','PY YTD&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;'}&amp;gt;}AMOUNT)&lt;BR /&gt;-Sum({$&amp;lt;SCENARIO_ANCESTOR_ID = {$(=vActual)},LOB_ANCESTOR_ID={[$(=only(%Acct_Report_LOB))]},ACCOUNT_ANCESTOR_ID = {'IS3','67000'},&lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;REFERENCE_PERIOD = {'SEQ MTD','PY YTD&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/FONT&gt;'}&amp;gt;}AMOUNT))/1000&lt;BR /&gt;,[$(=only(%Acct_Report_formatcode))]),&lt;/P&gt;&lt;P&gt;As you can see in my Reference_Period I am selecting either the sequential mtd or the prior ytd.&amp;nbsp; What is happening is that the calculation is (for example I select Feb 2021 as the period) the Pick calc is giving me January 2021 data, is there a way to hide it using the Calc. Condition expression?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chris_Elders_VZ_1-1627922007609.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59557i44D00536BC0B5DBE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Chris_Elders_VZ_1-1627922007609.png" alt="Chris_Elders_VZ_1-1627922007609.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I only want it to show for MTD but not YTD. &amp;nbsp;&amp;nbsp;Essentially I want to show columns 1-7 under MTD, and 8,12-14 under YTD, but I don't want to create 11 measures.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chris_Elders_VZ_2-1627922007650.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59558i261961CF7F4113A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Chris_Elders_VZ_2-1627922007650.png" alt="Chris_Elders_VZ_2-1627922007650.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chris_Elders_VZ_3-1627922007675.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59559i1D33F34A314D8992/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Chris_Elders_VZ_3-1627922007675.png" alt="Chris_Elders_VZ_3-1627922007675.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 02 Aug 2021 16:37:28 GMT</pubDate>
    <dc:creator>Chris_Elders_VZ</dc:creator>
    <dc:date>2021-08-02T16:37:28Z</dc:date>
    <item>
      <title>How to hide a measure based on Calc condition in a vizlib report</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-hide-a-measure-based-on-Calc-condition-in-a-vizlib-report/m-p/1826147#M67933</link>
      <description>&lt;P&gt;I am currently using a Vizlib Finance report to create a P&amp;amp;L.&amp;nbsp; We have grouped the measures for MTD &amp;amp; YTD using this formula so that we only have to create 7 columns and not 14 individual columns which creates a strain on calculations and the system.&amp;nbsp; The below formula is in my Dimensions&lt;/P&gt;&lt;P&gt;=if([Period Category]='MTD' or&amp;nbsp; [Period Category]='YTD',[Period Category])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example, the following is part of my measure calculation for my measure&lt;/P&gt;&lt;P&gt;Pick([$(=only(%Acct_Report))],&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Calc 1 in excel file&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Num(Sum({$&amp;lt;SCENARIO_ANCESTOR_ID = {$(=vActual)},LOB_ANCESTOR_ID={[$(=only(%Acct_Report_LOB))]},&lt;FONT color="#FF0000"&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;R&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;EFERENCE_PERIOD = {'SEQ MTD','PY YTD'&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/FONT&gt;}&amp;gt;}AMOUNT)/1000,[$(=only(%Acct_Report_formatcode))]),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' ',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //3&lt;/P&gt;&lt;P&gt;Num(&lt;BR /&gt;(Sum({$&amp;lt;SCENARIO_ANCESTOR_ID={$(=vActual)},LOB_ANCESTOR_ID={[$(=only(%Acct_Report_LOB))]},ACCOUNT_ANCESTOR_ID = {'4000'},&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;&lt;FONT color="#0000FF"&gt;REFERENCE_PERIOD = {'SEQ MTD','PY YTD&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;'}&amp;gt;}AMOUNT)&lt;BR /&gt;-Sum({$&amp;lt;SCENARIO_ANCESTOR_ID = {$(=vActual)},LOB_ANCESTOR_ID={[$(=only(%Acct_Report_LOB))]},ACCOUNT_ANCESTOR_ID = {'IS3','67000'},&lt;FONT color="#0000FF"&gt;&lt;EM&gt;&lt;U&gt;&lt;STRONG&gt;REFERENCE_PERIOD = {'SEQ MTD','PY YTD&lt;/STRONG&gt;&lt;/U&gt;&lt;/EM&gt;&lt;/FONT&gt;'}&amp;gt;}AMOUNT))/1000&lt;BR /&gt;,[$(=only(%Acct_Report_formatcode))]),&lt;/P&gt;&lt;P&gt;As you can see in my Reference_Period I am selecting either the sequential mtd or the prior ytd.&amp;nbsp; What is happening is that the calculation is (for example I select Feb 2021 as the period) the Pick calc is giving me January 2021 data, is there a way to hide it using the Calc. Condition expression?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chris_Elders_VZ_1-1627922007609.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59557i44D00536BC0B5DBE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Chris_Elders_VZ_1-1627922007609.png" alt="Chris_Elders_VZ_1-1627922007609.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I only want it to show for MTD but not YTD. &amp;nbsp;&amp;nbsp;Essentially I want to show columns 1-7 under MTD, and 8,12-14 under YTD, but I don't want to create 11 measures.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chris_Elders_VZ_2-1627922007650.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59558i261961CF7F4113A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Chris_Elders_VZ_2-1627922007650.png" alt="Chris_Elders_VZ_2-1627922007650.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Chris_Elders_VZ_3-1627922007675.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59559i1D33F34A314D8992/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Chris_Elders_VZ_3-1627922007675.png" alt="Chris_Elders_VZ_3-1627922007675.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Aug 2021 16:37:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-hide-a-measure-based-on-Calc-condition-in-a-vizlib-report/m-p/1826147#M67933</guid>
      <dc:creator>Chris_Elders_VZ</dc:creator>
      <dc:date>2021-08-02T16:37:28Z</dc:date>
    </item>
  </channel>
</rss>

