Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Skip the ticket, Chat with Qlik Support instead for instant assistance.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Aggr and variables

Hi! This is the continuation of my previous threat Agreggation and set analysis with parameters

What happens is that i need the implement the solution in a very particular way.

I have a table (like the one in the sample data), and i want to call in an expression a variable(with the ID conditional) that will call the final variable(the one with aggr and the one that actualy does the calculations).

I add my sample data updated with this solution (or tryal of it at least) and you will see it much clearly.

So it is something like this:

Expression:

EXPRESSION:    $(filter(FY={'FYQ4'}))

Variables:

filter:                      =if(ID=4,$(weightedmean($1)) )

weightedmean:    sum({<$1>} Aggr(DISTINCT Csat_Target * Weights, link_targets)) / sum( {<$1>} Aggr(DISTINCT Weights, link_targets) )   


How could I solve it? I really don't understand why it is not working! It is just calling variables!


Thanks,

I will try to look for your answers during the weekend Have a good weekend!


1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi Lluis,

I'm not sure. But try to remove the '=' sign for the variable 'filter'.  And add the 'ID' into the weightedmean variable.


Like


Variables:

filter:                      if(ID=4,$(weightedmean($1)) )

weightedmean:    sum({<$1>} Aggr(DISTINCT Csat_Target * Weights, link_targets,ID)) / sum( {<$1>} Aggr(DISTINCT Weights, link_targets,ID) ) 

View solution in original post

2 Replies
settu_periasamy
Master III
Master III

Hi Lluis,

I'm not sure. But try to remove the '=' sign for the variable 'filter'.  And add the 'ID' into the weightedmean variable.


Like


Variables:

filter:                      if(ID=4,$(weightedmean($1)) )

weightedmean:    sum({<$1>} Aggr(DISTINCT Csat_Target * Weights, link_targets,ID)) / sum( {<$1>} Aggr(DISTINCT Weights, link_targets,ID) ) 

Anonymous
Not applicable
Author

Hei! Sorry for not answering i was out for the weekend!

This worked perfectly!

Thanks again!