<?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: Set Analysis String Concatenation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Set-Analysis-String-Concatenation/m-p/1877143#M72303</link>
    <description>&lt;P&gt;please post some sample data and your expected result&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;Marco&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jan 2022 16:54:21 GMT</pubDate>
    <dc:creator>MarcoWedel</dc:creator>
    <dc:date>2022-01-04T16:54:21Z</dc:date>
    <item>
      <title>Set Analysis String Concatenation</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-String-Concatenation/m-p/1877122#M72298</link>
      <description>&lt;P&gt;Dear Qlik Experts,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to do a set analysis with a string concatenation with this formula :&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;sum({$&amp;lt;[Cost Baseline Version - FA]={$("RF_"&amp;amp; $(=Num([Year - FA]))&amp;amp;"01")}&amp;gt;} [EAC - FA]/1000000)&lt;/LI-CODE&gt;
&lt;P&gt;I must have the wrong formulation because the criteria isn't recognized and doesn't provide any numbers.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The formula below works.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;'RF_' &amp;amp; Num([Year - FA]+1) &amp;amp;'_01'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;Do you see why my set analysis isn't working ?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:21:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-String-Concatenation/m-p/1877122#M72298</guid>
      <dc:creator>abonnery</dc:creator>
      <dc:date>2024-11-15T23:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis String Concatenation</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-String-Concatenation/m-p/1877143#M72303</link>
      <description>&lt;P&gt;please post some sample data and your expected result&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 16:54:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-String-Concatenation/m-p/1877143#M72303</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2022-01-04T16:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis String Concatenation</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-String-Concatenation/m-p/1877400#M72330</link>
      <description>&lt;P&gt;Here is a data sample:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SA baseline.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69601i2952ECF06FA6FA9A/image-size/large?v=v2&amp;amp;px=999" role="button" title="SA baseline.PNG" alt="SA baseline.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I am trying to make the set analysis on the right work (I know there is an additionnal bracket in the picture it's just to show you the results I could like to see).&lt;/P&gt;
&lt;P&gt;The figures highlighted in red should not be null if the set analysis was working. For each year, the set analysis should do the sum of all [EAC-FA] of the [Cost Baseline Version - FA] of January of the same year.&lt;/P&gt;
&lt;P&gt;For now I have tested a few different script without success:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;sum({&amp;lt;[Cost Baseline Version - FA]={&lt;STRONG&gt;"$(='RF_'&amp;amp; Num([Year - FA]+1) &amp;amp;'_01')"&lt;/STRONG&gt;}&amp;gt;} [EAC - FA]/1000000)&lt;/P&gt;
&lt;P&gt;sum({$&amp;lt;[Cost Baseline Version - FA]={&lt;STRONG&gt;$("RF_"&amp;amp; $(=Num([Year - FA]))&amp;amp;"01")&lt;/STRONG&gt;}&amp;gt;} [EAC - FA]/1000000)&lt;/P&gt;
&lt;P&gt;I believe the criterion in bold is not recognized but I cannot find how to make it work&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 10:14:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-String-Concatenation/m-p/1877400#M72330</guid>
      <dc:creator>abonnery</dc:creator>
      <dc:date>2022-01-05T10:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis String Concatenation</title>
      <link>https://community.qlik.com/t5/App-Development/Set-Analysis-String-Concatenation/m-p/1877490#M72335</link>
      <description>&lt;P&gt;Dollar sign expansions and set expressions are only evaluated once, i.e. not on row level, so this cannot work by design.&lt;/P&gt;
&lt;P&gt;$(=Num([Year - FA])) for example is evaluated once before the rows are calculated. As there are at least three different [Year - FA] values possible in the current selection state of your example, it will not return a numerical value as you expect.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have a unique ID field in your fact table, then you could use something like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sum({$&amp;lt;ID={"=[Cost Baseline Version - FA]='RF_'&amp;amp;[Year - FA]&amp;amp;'_01'"}&amp;gt;} [EAC - FA]/1000000)&lt;/LI-CODE&gt;
&lt;P&gt;instead.&lt;/P&gt;
&lt;P&gt;Using only the fields of your example, this should also work&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Sum(If([Cost Baseline Version - FA]='RF_'&amp;amp;[Year - FA]&amp;amp;'_01', [EAC - FA]/1000000))&lt;/LI-CODE&gt;
&lt;P&gt;although I think a set expression solution should be preferred due to better performance.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 13:25:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Set-Analysis-String-Concatenation/m-p/1877490#M72335</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2022-01-05T13:25:09Z</dc:date>
    </item>
  </channel>
</rss>

