<?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 Issue in combining two expression using set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Issue-in-combining-two-expression-using-set-analysis/m-p/50289#M8299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have an issue in combining two expressions using set analysis. Below is my current expression using as a KPI in text box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;=if(only(Vehicle_Use) = 'LEASE',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;num(Round(Avg(Aggr(count({&amp;lt;Vehicle_Use-={''},Corp_BP_Type={'LIGHT','MEDIUM','TRACTOR','TRAILER'},Current_Cust_Number ={'699999','699998'}&amp;gt;}FLEET_COUNT),Day,MonthName,Year))),'#,##0'), &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;// First expression&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;num(Round(Avg(Aggr(count({&amp;lt;Vehicle_Use-={''},Corp_BP_Type= {'LIGHT','MEDIUM','TRACTOR','TRAILER'}&amp;gt;}FLEET_COUNT),Day,MonthName,Year))),'#,##0')) &lt;STRONG style="color: #ff0000;"&gt;// Second Expression&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;From the above, in second expression I am trying to combine both expressions like below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;only&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Vehicle_Use&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) = 'LEASE',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Round&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Vehicle_Use&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-={''},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Corp_BP_Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'LIGHT','MEDIUM','TRACTOR','TRAILER'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Current_Cust_Number&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ={'699999','699998'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FLEET_COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MonthName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))),'#,##0'),&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Round&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Vehicle_Use&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'LEASE'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Corp_BP_Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'LIGHT','MEDIUM','TRACTOR','TRAILER'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Current_Cust_Number&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ={'699999','699998'}&amp;gt;+&lt;BR /&gt; &lt;SPAN style="font-family: verdana,geneva;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Vehicle_Use&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'RENTAL','T1W'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Corp_BP_Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'LIGHT','MEDIUM','TRACTOR','TRAILER'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FLEET_COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MonthName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))),'#,##0')) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: verdana,geneva;"&gt;Here I am getting total value and I have three entries in Vehile_Use field (LEASE,RENTAL,T1W), from this if I select LEASE the value is getting filtered correctly from the total&amp;nbsp; but its not working for RENTAL, T1W selections (if we select RENTAL or T1W its always showing combination of both) it should show different values for RENTAL and T1W.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: verdana,geneva;"&gt;Please let me know what is wrong with this expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: verdana,geneva;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: verdana,geneva;"&gt;Anil &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 May 2018 15:49:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-03T15:49:56Z</dc:date>
    <item>
      <title>Issue in combining two expression using set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Issue-in-combining-two-expression-using-set-analysis/m-p/50289#M8299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;Hello,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have an issue in combining two expressions using set analysis. Below is my current expression using as a KPI in text box.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;=if(only(Vehicle_Use) = 'LEASE',&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;num(Round(Avg(Aggr(count({&amp;lt;Vehicle_Use-={''},Corp_BP_Type={'LIGHT','MEDIUM','TRACTOR','TRAILER'},Current_Cust_Number ={'699999','699998'}&amp;gt;}FLEET_COUNT),Day,MonthName,Year))),'#,##0'), &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;// First expression&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;num(Round(Avg(Aggr(count({&amp;lt;Vehicle_Use-={''},Corp_BP_Type= {'LIGHT','MEDIUM','TRACTOR','TRAILER'}&amp;gt;}FLEET_COUNT),Day,MonthName,Year))),'#,##0')) &lt;STRONG style="color: #ff0000;"&gt;// Second Expression&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;From the above, in second expression I am trying to combine both expressions like below.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;only&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Vehicle_Use&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) = 'LEASE',&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Round&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Vehicle_Use&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;-={''},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Corp_BP_Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'LIGHT','MEDIUM','TRACTOR','TRAILER'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Current_Cust_Number&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ={'699999','699998'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FLEET_COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MonthName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))),'#,##0'),&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Round&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Avg&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;count&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Vehicle_Use&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'LEASE'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Corp_BP_Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'LIGHT','MEDIUM','TRACTOR','TRAILER'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Current_Cust_Number&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; ={'699999','699998'}&amp;gt;+&lt;BR /&gt; &lt;SPAN style="font-family: verdana,geneva;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: verdana,geneva;"&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Vehicle_Use&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'RENTAL','T1W'},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Corp_BP_Type&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'LIGHT','MEDIUM','TRACTOR','TRAILER'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FLEET_COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Day&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MonthName&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;))),'#,##0')) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: verdana,geneva;"&gt;Here I am getting total value and I have three entries in Vehile_Use field (LEASE,RENTAL,T1W), from this if I select LEASE the value is getting filtered correctly from the total&amp;nbsp; but its not working for RENTAL, T1W selections (if we select RENTAL or T1W its always showing combination of both) it should show different values for RENTAL and T1W.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: verdana,geneva;"&gt;Please let me know what is wrong with this expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: verdana,geneva;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 10pt; font-family: verdana,geneva;"&gt;Anil &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 May 2018 15:49:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Issue-in-combining-two-expression-using-set-analysis/m-p/50289#M8299</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-03T15:49:56Z</dc:date>
    </item>
  </channel>
</rss>

