<?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 Variable Holding Expression Expansion issue in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Variable-Holding-Expression-Expansion-issue/m-p/2484943#M101207</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have an expression that I load into a variable (from Excel), but when I use that variable in a pivot table expression it does not populate correctly.&amp;nbsp; I get a single total across dimensions (I am guessing this is a variable expansion issue).&lt;/P&gt;
&lt;P&gt;The expression is&lt;/P&gt;
&lt;P&gt;=(&lt;BR /&gt;((&lt;BR /&gt;((Num(Sum({$&amp;lt;[Cash Booking Date] = , [Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-2)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-2)&amp;amp;01)"}&amp;gt;}[Earned Premium Est Inc])/ (Divider),'#,##0.')&lt;BR /&gt;+&lt;BR /&gt;Num(Sum({$&amp;lt;[Cash Booking Date] = , [Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-1)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-1)&amp;amp;01)"}&amp;gt;}[Earned Premium Est Inc])/ (Divider),'#,##0.')))&lt;BR /&gt;-&lt;BR /&gt;Num(Sum({$&amp;lt;[Booking Date] =, [Cash Booking Date] = ,[Cash Booking Date Year] ={'2021'}+{'2022'}&amp;gt;}cash_premium)/ (Divider),'#,##0.'))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;-&lt;BR /&gt;(&lt;BR /&gt;(Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-2)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-2)&amp;amp;01)"}&amp;gt;}[Acquisition Expense Est Inc])/ (Divider),'#,##0.')&lt;BR /&gt;+&lt;BR /&gt;(Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-2)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-2)&amp;amp;01)"}&amp;gt;}pd_treaty)/ (Divider),'#,##0.')&lt;BR /&gt;-&lt;BR /&gt;Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-2)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-2)&amp;amp;01)"}&amp;gt;}dac_treaty)/ (Divider),'#,##0.'))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;+&lt;/P&gt;
&lt;P&gt;(Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-1)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-1)&amp;amp;01)"}&amp;gt;}[Acquisition Expense Est Inc])/ (Divider),'#,##0.')&lt;BR /&gt;+&lt;BR /&gt;(Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-1)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-1)&amp;amp;01)"}&amp;gt;}pd_treaty)/ (Divider),'#,##0.')&lt;BR /&gt;-&lt;BR /&gt;Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-1)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-1)&amp;amp;01)"}&amp;gt;}dac_treaty)/ (Divider),'#,##0.'))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;-&lt;/P&gt;
&lt;P&gt;Num(Sum({$&amp;lt;[Booking Date] =, [Cash Booking Date] = ,[Cash Booking Date Year] ={'2021'}+{'2022'}&amp;gt;}cash_acquisition_cost)/ (Divider),'#,##0.')&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;If I use the expression I get the correct results for "Opening balance insurance contract liabilities" -&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Brip51_0-1727883426177.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/172443iBB828F5937C1FC7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Brip51_0-1727883426177.png" alt="Brip51_0-1727883426177.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If I use the variable with dollar expansion&amp;nbsp;$(vIFRSLRCOpeningBalLB) I get the total on each row-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Brip51_1-1727883840254.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/172444iCFCCC998C762725F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Brip51_1-1727883840254.png" alt="Brip51_1-1727883840254.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I did try&amp;nbsp;&amp;nbsp;$(=vIFRSLRCOpeningBalLB).sam result&lt;/P&gt;
&lt;P&gt;I am not sure what is going on.&lt;/P&gt;
&lt;P&gt;Any ideas where I am going wrong with my expression variable ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank You,&lt;/P&gt;
&lt;P&gt;Brian&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2024 15:49:27 GMT</pubDate>
    <dc:creator>Brip51</dc:creator>
    <dc:date>2024-10-02T15:49:27Z</dc:date>
    <item>
      <title>Variable Holding Expression Expansion issue</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-Holding-Expression-Expansion-issue/m-p/2484943#M101207</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have an expression that I load into a variable (from Excel), but when I use that variable in a pivot table expression it does not populate correctly.&amp;nbsp; I get a single total across dimensions (I am guessing this is a variable expansion issue).&lt;/P&gt;
&lt;P&gt;The expression is&lt;/P&gt;
&lt;P&gt;=(&lt;BR /&gt;((&lt;BR /&gt;((Num(Sum({$&amp;lt;[Cash Booking Date] = , [Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-2)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-2)&amp;amp;01)"}&amp;gt;}[Earned Premium Est Inc])/ (Divider),'#,##0.')&lt;BR /&gt;+&lt;BR /&gt;Num(Sum({$&amp;lt;[Cash Booking Date] = , [Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-1)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-1)&amp;amp;01)"}&amp;gt;}[Earned Premium Est Inc])/ (Divider),'#,##0.')))&lt;BR /&gt;-&lt;BR /&gt;Num(Sum({$&amp;lt;[Booking Date] =, [Cash Booking Date] = ,[Cash Booking Date Year] ={'2021'}+{'2022'}&amp;gt;}cash_premium)/ (Divider),'#,##0.'))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;-&lt;BR /&gt;(&lt;BR /&gt;(Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-2)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-2)&amp;amp;01)"}&amp;gt;}[Acquisition Expense Est Inc])/ (Divider),'#,##0.')&lt;BR /&gt;+&lt;BR /&gt;(Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-2)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-2)&amp;amp;01)"}&amp;gt;}pd_treaty)/ (Divider),'#,##0.')&lt;BR /&gt;-&lt;BR /&gt;Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-2)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-2)&amp;amp;01)"}&amp;gt;}dac_treaty)/ (Divider),'#,##0.'))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;+&lt;/P&gt;
&lt;P&gt;(Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-1)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-1)&amp;amp;01)"}&amp;gt;}[Acquisition Expense Est Inc])/ (Divider),'#,##0.')&lt;BR /&gt;+&lt;BR /&gt;(Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-1)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-1)&amp;amp;01)"}&amp;gt;}pd_treaty)/ (Divider),'#,##0.')&lt;BR /&gt;-&lt;BR /&gt;Num(Sum({$&amp;lt;[Cash Booking Date] = ,[Booking Date] = ,business_effective_year_month = {"&amp;lt;=$(=Max([To Book Year]-1)&amp;amp;12)&amp;gt;=$(=Max([To Book Year]-1)&amp;amp;01)"}&amp;gt;}dac_treaty)/ (Divider),'#,##0.'))&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;-&lt;/P&gt;
&lt;P&gt;Num(Sum({$&amp;lt;[Booking Date] =, [Cash Booking Date] = ,[Cash Booking Date Year] ={'2021'}+{'2022'}&amp;gt;}cash_acquisition_cost)/ (Divider),'#,##0.')&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;If I use the expression I get the correct results for "Opening balance insurance contract liabilities" -&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Brip51_0-1727883426177.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/172443iBB828F5937C1FC7D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Brip51_0-1727883426177.png" alt="Brip51_0-1727883426177.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If I use the variable with dollar expansion&amp;nbsp;$(vIFRSLRCOpeningBalLB) I get the total on each row-&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Brip51_1-1727883840254.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/172444iCFCCC998C762725F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Brip51_1-1727883840254.png" alt="Brip51_1-1727883840254.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I did try&amp;nbsp;&amp;nbsp;$(=vIFRSLRCOpeningBalLB).sam result&lt;/P&gt;
&lt;P&gt;I am not sure what is going on.&lt;/P&gt;
&lt;P&gt;Any ideas where I am going wrong with my expression variable ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank You,&lt;/P&gt;
&lt;P&gt;Brian&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 15:49:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-Holding-Expression-Expansion-issue/m-p/2484943#M101207</guid>
      <dc:creator>Brip51</dc:creator>
      <dc:date>2024-10-02T15:49:27Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Holding Expression Expansion issue</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-Holding-Expression-Expansion-issue/m-p/2484947#M101208</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/32065"&gt;@Brip51&lt;/a&gt;&amp;nbsp; It's because your expression starts with&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"="&amp;nbsp;&lt;/STRONG&gt;&lt;FONT color="#000000"&gt;&lt;FONT color="#000000"&gt;in your variable. So your expression is evaluating inside variable and storing the value which is getting repeated across dimension values. You need to remove initial&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;"="&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 16:08:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-Holding-Expression-Expansion-issue/m-p/2484947#M101208</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-10-02T16:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Variable Holding Expression Expansion issue</title>
      <link>https://community.qlik.com/t5/App-Development/Variable-Holding-Expression-Expansion-issue/m-p/2485125#M101232</link>
      <description>&lt;P&gt;Hi Kushal,&lt;/P&gt;
&lt;P&gt;Thank you !&amp;nbsp; I did not realize this.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Worked perfectly after the update you recommended&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Brian&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 14:13:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Variable-Holding-Expression-Expansion-issue/m-p/2485125#M101232</guid>
      <dc:creator>Brip51</dc:creator>
      <dc:date>2024-10-03T14:13:04Z</dc:date>
    </item>
  </channel>
</rss>

