Qlik Community

Ask a Question

App Development

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

Announcements
April 22, 2PM EST: Learn about GeoOperations in Qlik Sense SaaS READ MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
suresh_qv50
Creator
Creator

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
MVP & Luminary
MVP & Luminary

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
Creator
Creator
Author

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
MVP & Luminary
MVP & Luminary

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

- Marcus