<?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: Using a variable to calculate field Name vs IF condition in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-a-variable-to-calculate-field-Name-vs-IF-condition/m-p/2548233#M110158</link>
    <description>&lt;P&gt;Other than what&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22035"&gt;@marksouzacosta&lt;/a&gt;&amp;nbsp; said, we may also need more context of what you are trying to achieve. The sample you provided looks more like option for calculated dimension which can be handled via backend rather than expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;</description>
    <pubDate>Thu, 30 Apr 2026 23:15:45 GMT</pubDate>
    <dc:creator>Lech_Miszkiewicz</dc:creator>
    <dc:date>2026-04-30T23:15:45Z</dc:date>
    <item>
      <title>Using a variable to calculate field Name vs IF condition</title>
      <link>https://community.qlik.com/t5/App-Development/Using-a-variable-to-calculate-field-Name-vs-IF-condition/m-p/2548224#M110154</link>
      <description>&lt;P&gt;Hi everyone,&lt;BR /&gt;&lt;BR /&gt;I'm trying to optimize the performance for a table object. I am currently using AGGR and set analysis as follow:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AGGR(ONLY({&amp;lt;PRESENCE = {$(vPresence)}&amp;gt;} CLIENT_ID),CLIENT_ID)&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Where&amp;nbsp;&lt;EM&gt;vPresence&amp;nbsp;&lt;/EM&gt;can be &lt;STRONG&gt;'YES','NO'&lt;/STRONG&gt; or &lt;STRONG&gt;'YES'&amp;nbsp;&lt;/STRONG&gt;, depending on user profile (SECTION ACCESS)&lt;BR /&gt;I know that this column may be optimized, and I &lt;SPAN&gt;thought that a solution could be changing the variable to&amp;nbsp;&lt;STRONG&gt;-1&amp;nbsp;&lt;/STRONG&gt;or&amp;nbsp;&lt;STRONG&gt;0&lt;/STRONG&gt; and making something like:&lt;BR /&gt;&lt;BR /&gt;&lt;EM&gt;IF(vNewVariable, CLIENT_ID, CLIENT_ID_ONLY_PRESENCE)&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;Being &lt;EM&gt;CLIENT_ID_ONLY_PRESENCE&amp;nbsp;&lt;/EM&gt;a copy of&amp;nbsp;&lt;EM&gt;CLIENT_ID&lt;/EM&gt; where PRESENCE = 'YES'&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;My question is:&lt;BR /&gt;&lt;/STRONG&gt;&lt;STRONG&gt;Is it better to use a variable to determine the field name? since&amp;nbsp;&lt;EM&gt;vPresence &lt;/EM&gt;depends on the user and not other fields ( is static for each user).&lt;/STRONG&gt;&lt;BR /&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;Something like:&lt;BR /&gt;&lt;EM&gt;=$(=IF(vNewVariable, 'CLIENT_ID', 'CLIENT_ID_ONLY_PRESENCE'))&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;I don't know if evaluating the&amp;nbsp;&lt;EM&gt;if&lt;/EM&gt; condition by variable is better than a direct&amp;nbsp;&lt;EM&gt;if&lt;/EM&gt;. would it be calculated each row? is there any performance difference between the last two expressions?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2026 17:57:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-a-variable-to-calculate-field-Name-vs-IF-condition/m-p/2548224#M110154</guid>
      <dc:creator>LuisGramillo</dc:creator>
      <dc:date>2026-04-30T17:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable to calculate field Name vs IF condition</title>
      <link>https://community.qlik.com/t5/App-Development/Using-a-variable-to-calculate-field-Name-vs-IF-condition/m-p/2548232#M110157</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/322858"&gt;@LuisGramillo&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;If you are using Section Access with Data Reduction you don't need those conditions in your Expressions at all. Section Access already handles that. Please take a look at:&amp;nbsp;&lt;A href="https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/Security/manage-security-with-section-access.htm" target="_blank"&gt;https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/Security/manage-security-with-section-access.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Search for the section: "Managing user access to specific data in an application"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Mark Costa&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2026 23:02:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-a-variable-to-calculate-field-Name-vs-IF-condition/m-p/2548232#M110157</guid>
      <dc:creator>marksouzacosta</dc:creator>
      <dc:date>2026-04-30T23:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable to calculate field Name vs IF condition</title>
      <link>https://community.qlik.com/t5/App-Development/Using-a-variable-to-calculate-field-Name-vs-IF-condition/m-p/2548233#M110158</link>
      <description>&lt;P&gt;Other than what&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22035"&gt;@marksouzacosta&lt;/a&gt;&amp;nbsp; said, we may also need more context of what you are trying to achieve. The sample you provided looks more like option for calculated dimension which can be handled via backend rather than expression.&amp;nbsp;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;</description>
      <pubDate>Thu, 30 Apr 2026 23:15:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-a-variable-to-calculate-field-Name-vs-IF-condition/m-p/2548233#M110158</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2026-04-30T23:15:45Z</dc:date>
    </item>
  </channel>
</rss>

