Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Issue in combining two expression using set analysis

Hello,

         I have an issue in combining two expressions using set analysis. Below is my current expression using as a KPI in text box.

=if(only(Vehicle_Use) = 'LEASE',

num(Round(Avg(Aggr(count({<Vehicle_Use-={''},Corp_BP_Type={'LIGHT','MEDIUM','TRACTOR','TRAILER'},Current_Cust_Number ={'699999','699998'}>}FLEET_COUNT),Day,MonthName,Year))),'#,##0'), // First expression

num(Round(Avg(Aggr(count({<Vehicle_Use-={''},Corp_BP_Type= {'LIGHT','MEDIUM','TRACTOR','TRAILER'}>}FLEET_COUNT),Day,MonthName,Year))),'#,##0')) // Second Expression

From the above, in second expression I am trying to combine both expressions like below.

=if(only(Vehicle_Use) = 'LEASE',
num(Round(Avg(Aggr(count({<Vehicle_Use-={''},Corp_BP_Type={'LIGHT','MEDIUM','TRACTOR','TRAILER'},Current_Cust_Number ={'699999','699998'}>}FLEET_COUNT),Day,MonthName,Year))),'#,##0'),
num(Round(Avg(Aggr(count({<Vehicle_Use={'LEASE'},Corp_BP_Type={'LIGHT','MEDIUM','TRACTOR','TRAILER'},Current_Cust_Number ={'699999','699998'}>+
<
Vehicle_Use={'RENTAL','T1W'},Corp_BP_Type={'LIGHT','MEDIUM','TRACTOR','TRAILER'}>}FLEET_COUNT),Day,MonthName,Year))),'#,##0'))

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  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.

Please let me know what is wrong with this expression.

Regards,

Anil

0 Replies