<?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: Nested IF Optimization in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Nested-IF-Optimization/m-p/1984575#M81241</link>
    <description>&lt;P&gt;Gi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/92390"&gt;@Lakshminarayanan_J&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is not clear which parts of this expressions can be moved to smart design of data model and which must be hardcoded. Looking at labels of your measure the concept seems to be similar to the one you would normally use in PnL where groupings can be done in data model layer. That would be typical to tabular view. Is this something you could use? To answer that question we would actually have to understand each of the variables components you have inside of your IF statement. We would need to understand&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;what is the go with # and % - is this something what is shown in the same view at the same time for different dimension values or is it always showing only # or only % at the time/&lt;/LI&gt;
&lt;LI&gt;why do you have so many expressions for Autoride, Manual,Autocost etc.. are those additive measures&lt;/LI&gt;
&lt;LI&gt;what are dimensions you are putting those measures agains? Could dimensions be used to actually have a single measure instead of many?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I am just guessing here - without knowing data model, requirements of how the finished view needs to look like it is pointless to guess i reckon. Maybe others will help more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Sep 2022 08:28:50 GMT</pubDate>
    <dc:creator>Lech_Miszkiewicz</dc:creator>
    <dc:date>2022-09-23T08:28:50Z</dc:date>
    <item>
      <title>Nested IF Optimization</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-IF-Optimization/m-p/1984561#M81239</link>
      <description>&lt;P&gt;Dear Experts,&lt;/P&gt;
&lt;P&gt;Need to optimize the below query , It has been used in across pie chart, Adhoc table, Bar chart.&lt;/P&gt;
&lt;P&gt;We have&amp;nbsp; 2 different data which will be displayed in absolute (#) and percentage(%)&lt;/P&gt;
&lt;P&gt;1.No&lt;/P&gt;
&lt;P&gt;2.J&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Expression need to optimize&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;if(Calc='Auto',&lt;/P&gt;
&lt;P&gt;if(PivotContent=No(#)', $(VAuto#) ,if(PivotContent='No(%)', $(VAuto%))),&lt;/P&gt;
&lt;P&gt;if(CalcMeasure='Autoride’,&lt;/P&gt;
&lt;P&gt;if(PivotContent=' No(#)'', $(VAutoride#) ,if(PivotContent= ’No(%)', $(VAutoride%))),&lt;/P&gt;
&lt;P&gt;if(CalcMeasure='Manual',&lt;/P&gt;
&lt;P&gt;if(PivotContent=' No(#)'',$(VManual#) ,if(PivotContent=' No(%)'',$(VManual%))),&lt;/P&gt;
&lt;P&gt;if(CalcMeasure='Fullycost',&lt;/P&gt;
&lt;P&gt;if(PivotContent='J(#)',$(VFullycost#) ,if(PivotContent='J(%)',$(VFullycost%))),&lt;/P&gt;
&lt;P&gt;if(CalcMeasure='AutoAdjust',&lt;/P&gt;
&lt;P&gt;if(PivotContent='J(#)',$(VAutoAdjust#) ,if(PivotContent='J(%)',$(VAutoAdjust%))),&lt;/P&gt;
&lt;P&gt;if(CalcMeasure='PAutocost',&lt;/P&gt;
&lt;P&gt;if(PivotContent='J(#)',$(VAutocost#),if(PivotContent='J(%)',$(VPAutocost%))),&lt;/P&gt;
&lt;P&gt;if(CalcMeasure='Ncost',&lt;/P&gt;
&lt;P&gt;if(PivotContent='J(#)',$(VNcost#) ,if(PivotContent='J(%)',$(VNcost%)))&lt;/P&gt;
&lt;P&gt;)))))))&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/22593"&gt;@rubenmarin&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/48712"&gt;@Frank_S&lt;/a&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/1326"&gt;@Lech_Miszkiewicz&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/137787"&gt;@Arlind&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-PRODUCT title="Qlik Sense Business" id="qlikSenseBusiness"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 08:03:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-IF-Optimization/m-p/1984561#M81239</guid>
      <dc:creator>Lakshminarayanan_J</dc:creator>
      <dc:date>2022-09-23T08:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF Optimization</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-IF-Optimization/m-p/1984571#M81240</link>
      <description>&lt;P&gt;Hi, Why Auto is 'Calc' and the others 'CalcMeasure', just a typo?&lt;/P&gt;
&lt;P&gt;If CalcMeasure it's something selected outside, and with only one values selected, and PivotContent only has those 2 possible values, the expression can be simplified as:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;if(PivotContent=No(#)'
  ,$(V$(=CalcMeasure)#) 
  ,$(V$(=CalcMeasure)%)
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 08:18:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-IF-Optimization/m-p/1984571#M81240</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-09-23T08:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: Nested IF Optimization</title>
      <link>https://community.qlik.com/t5/App-Development/Nested-IF-Optimization/m-p/1984575#M81241</link>
      <description>&lt;P&gt;Gi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/92390"&gt;@Lakshminarayanan_J&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is not clear which parts of this expressions can be moved to smart design of data model and which must be hardcoded. Looking at labels of your measure the concept seems to be similar to the one you would normally use in PnL where groupings can be done in data model layer. That would be typical to tabular view. Is this something you could use? To answer that question we would actually have to understand each of the variables components you have inside of your IF statement. We would need to understand&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;what is the go with # and % - is this something what is shown in the same view at the same time for different dimension values or is it always showing only # or only % at the time/&lt;/LI&gt;
&lt;LI&gt;why do you have so many expressions for Autoride, Manual,Autocost etc.. are those additive measures&lt;/LI&gt;
&lt;LI&gt;what are dimensions you are putting those measures agains? Could dimensions be used to actually have a single measure instead of many?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;I am just guessing here - without knowing data model, requirements of how the finished view needs to look like it is pointless to guess i reckon. Maybe others will help more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 08:28:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Nested-IF-Optimization/m-p/1984575#M81241</guid>
      <dc:creator>Lech_Miszkiewicz</dc:creator>
      <dc:date>2022-09-23T08:28:50Z</dc:date>
    </item>
  </channel>
</rss>

