Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sakshikaul
Creator II
Creator II

Converting into set analysis

Hi,

I want to covert following expression into set analysis and add filters([prod date] and [manager name]) like below expression given as an eg ) to the expression below

=interval(div(sum(aggr(avg(distinct(TI_AUX)),agent_ID,DT_time_key)),3600)

&':'&(div(sum(aggr(avg(dstinct(TI_AUX)),agent_ID,DT_time_key)),60)-div(sum(aggr(avg(dstinct(TI_AUX)),agent_ID,DT_time_key)),3600)*60,'HH:mm')

I have already written an expression for some another requirement using set analysis. In a similar manner I want to convert the above expression with filters 

eg-

=num(sum({1<[sujct]={'vol'},[prod date]=p[prod date],[manager name]=p[manager name])>[volume count]),'#,##0')

Please help

 

2 Replies
chrismarlow
Specialist II
Specialist II

Hi,

I think generally you will need your set at every point you aggregate (so for each sum/avg in the expression). Similar to the reply here;

Solved: Aggr Nested in Set Analysis - Qlik Community - 216128

Cheers,

Chris.

 

Shepherd69
Contributor III
Contributor III

@myccpay wrote:

Hi,

I want to covert following expression into set analysis and add filters([prod date] and [manager name]) like below expression given as an eg ) to the expression below

=interval(div(sum(aggr(avg(distinct(TI_AUX)),agent_ID,DT_time_key)),3600)

&':'&(div(sum(aggr(avg(dstinct(TI_AUX)),agent_ID,DT_time_key)),60)-div(sum(aggr(avg(dstinct(TI_AUX)),agent_ID,DT_time_key)),3600)*60,'HH:mm')

I have already written an expression for some another requirement using set analysis. In a similar manner I want to convert the above expression with filters 

eg-

=num(sum({1<[sujct]={'vol'},[prod date]=p[prod date],[manager name]=p[manager name])>[volume count]),'#,##0')

Please help

 


It's sometimes convenient to make use of variables in set expressions to make them even more dynamic. We've previously discussed how variables alone are used. We will now go through some examples of Set Analysis expressions that make use of variables instead of hard-coded field values.