<?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 Measure with if and when 2 dimensions equate in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Measure-with-if-and-when-2-dimensions-equate/m-p/1877901#M72372</link>
    <description>&lt;P&gt;Dear Qlik Experts.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am struggling with creating a measure where 2 fields are equals.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I am trying to do is to have the 3rd field below not null.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to sum all measures [EAC -FA] where the dimension [Cost Baseline version - FA] (2nd image) is equal to the dimension&amp;nbsp; below (2nd field in the 1st image and this code works):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;only({&amp;lt;[Year - FA]={2020}&amp;gt;}
if([Month - FA]&amp;lt;&amp;gt;1 and [Month - FA]&amp;lt;&amp;gt;12,
if([Month - FA]&amp;lt;=10,'RF_'&amp;amp;[Year - FA]&amp;amp;'_0'&amp;amp; Num([Month - FA]-1),'RF_'&amp;amp;[Year - FA]&amp;amp; '_' &amp;amp; Num([Month - FA]-1)),'.'))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see below, I have tried to make this new measure work (3rd field) with &lt;STRONG&gt;this code&lt;/STRONG&gt; without any success :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Aggr(sum(if([Cost Baseline Version - FA]=
Aggr(only({&amp;lt;[Year - FA]={2020}&amp;gt;}
if([Month - FA]&amp;lt;&amp;gt;1 and [Month - FA]&amp;lt;&amp;gt;12,
if([Month - FA]&amp;lt;=10,'RF_'&amp;amp;[Year - FA]&amp;amp;'_0'&amp;amp; Num([Month - FA]-1),
'RF_'&amp;amp;[Year - FA]&amp;amp; '_' &amp;amp; Num([Month - FA]-1)),
'.'))
,[Month - FA]) ,[EAC - FA]/1000000)),[Month - FA])&lt;/LI-CODE&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="pb 2 fields equates.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69680iB426F2EB689D7565/image-size/large?v=v2&amp;amp;px=999" role="button" title="pb 2 fields equates.PNG" alt="pb 2 fields equates.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RF_2020.PNG" style="width: 416px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69681iA279FB0C90B319F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="RF_2020.PNG" alt="RF_2020.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Do you wee why the last code isn't working ? The syntax of the 2 fields I am trying to equate is EXACTLY the same. Maybe I need to add a # somewhere ?&lt;/P&gt;
&lt;P&gt;I have not tried it with a set analytics because I don't know how to do it with a "simple" if function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your help. I have been stuck for days on this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 16:51:59 GMT</pubDate>
    <dc:creator>abonnery</dc:creator>
    <dc:date>2024-11-16T16:51:59Z</dc:date>
    <item>
      <title>Measure with if and when 2 dimensions equate</title>
      <link>https://community.qlik.com/t5/App-Development/Measure-with-if-and-when-2-dimensions-equate/m-p/1877901#M72372</link>
      <description>&lt;P&gt;Dear Qlik Experts.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am struggling with creating a measure where 2 fields are equals.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I am trying to do is to have the 3rd field below not null.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to sum all measures [EAC -FA] where the dimension [Cost Baseline version - FA] (2nd image) is equal to the dimension&amp;nbsp; below (2nd field in the 1st image and this code works):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;only({&amp;lt;[Year - FA]={2020}&amp;gt;}
if([Month - FA]&amp;lt;&amp;gt;1 and [Month - FA]&amp;lt;&amp;gt;12,
if([Month - FA]&amp;lt;=10,'RF_'&amp;amp;[Year - FA]&amp;amp;'_0'&amp;amp; Num([Month - FA]-1),'RF_'&amp;amp;[Year - FA]&amp;amp; '_' &amp;amp; Num([Month - FA]-1)),'.'))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you can see below, I have tried to make this new measure work (3rd field) with &lt;STRONG&gt;this code&lt;/STRONG&gt; without any success :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Aggr(sum(if([Cost Baseline Version - FA]=
Aggr(only({&amp;lt;[Year - FA]={2020}&amp;gt;}
if([Month - FA]&amp;lt;&amp;gt;1 and [Month - FA]&amp;lt;&amp;gt;12,
if([Month - FA]&amp;lt;=10,'RF_'&amp;amp;[Year - FA]&amp;amp;'_0'&amp;amp; Num([Month - FA]-1),
'RF_'&amp;amp;[Year - FA]&amp;amp; '_' &amp;amp; Num([Month - FA]-1)),
'.'))
,[Month - FA]) ,[EAC - FA]/1000000)),[Month - FA])&lt;/LI-CODE&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="pb 2 fields equates.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69680iB426F2EB689D7565/image-size/large?v=v2&amp;amp;px=999" role="button" title="pb 2 fields equates.PNG" alt="pb 2 fields equates.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RF_2020.PNG" style="width: 416px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69681iA279FB0C90B319F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="RF_2020.PNG" alt="RF_2020.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Do you wee why the last code isn't working ? The syntax of the 2 fields I am trying to equate is EXACTLY the same. Maybe I need to add a # somewhere ?&lt;/P&gt;
&lt;P&gt;I have not tried it with a set analytics because I don't know how to do it with a "simple" if function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for your help. I have been stuck for days on this.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 16:51:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Measure-with-if-and-when-2-dimensions-equate/m-p/1877901#M72372</guid>
      <dc:creator>abonnery</dc:creator>
      <dc:date>2024-11-16T16:51:59Z</dc:date>
    </item>
  </channel>
</rss>

