Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
suresh_qv50
Not applicable

SetAnalysis usage in Qliksense Script Getting Error

Hi Every One,

Am facing issue when using set analysis and aggr in qliksense script, Always getting script error for these expresions

Aggr:

if(aggr(count(TransactionId),BankName)< 500,'Others',left(BankName,10))

Set Analysis:

Temp:

load

sum({<PL.paidindays = {'-14'}>}PL.DueAmt) as [Statement DueAmt] resident PaymentLiquidation;

if i use any set analysis expresions like Qlikview always getting like this

sum({<PL.paidindays = {'-14'}>}PL.DueAmt) as [Statement DueAmt]

Getting Red Mark after sum .. Can any one give me alternative expression in case of Aggr and Set Analysis.

Regards

suresh

3 Replies
marcus_sommer
Not applicable

Re: SetAnalysis usage in Qliksense Script Getting Error

Set analysis and aggr-functions are features from the gui - they aren't available on script-level. You will need for the aggregations group by loadings and if-loops for for the conditions.

- Marcus

suresh_qv50
Not applicable

Re: SetAnalysis usage in Qliksense Script Getting Error

We are using nested if conditions to achieve cyclic functionality it leads poor performance,  Is there any optimised expression for these type of expression

IF($(vDim)=1,Year,if($(vDim)=2,Month,if($(vDim)=3,Date,if($(vDim)=4,store))))

Regards

suresh

marcus_sommer
Not applicable

Re: SetAnalysis usage in Qliksense Script Getting Error

Instead of nested if-lops you could use pick(match()) - take a look here: is nested if allowed in Average()?

- Marcus