Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
surajap123
Creator III
Creator III

Expression help

Hi,

I have the below expression which I think is not very good for performance.

SUM(AGGR(COUNT(DISTINCT(IF(NominalName = 'Item Fees' AND Status <> 'Cancelled', CustID))),CustID,FMonth ))

Is it possible to re-write the expression, say changing sum() position in the expression)  or using set analysis.

Regards,

suraj

Labels (1)
1 Solution

Accepted Solutions
christophebrault
Specialist
Specialist

Hi,

you could use this one :


SUM(AGGR(

COUNT(DISTINCT {$<NominalName = {'Item Fees'}, Status={'*'}-{'Cancelled'}>}CustID)

,CustID,FMonth ))


Using AGRR depends on your needs, the place you use the expression (text box, charts...)

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin

View solution in original post

2 Replies
christophebrault
Specialist
Specialist

Hi,

you could use this one :


SUM(AGGR(

COUNT(DISTINCT {$<NominalName = {'Item Fees'}, Status={'*'}-{'Cancelled'}>}CustID)

,CustID,FMonth ))


Using AGRR depends on your needs, the place you use the expression (text box, charts...)

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
surajap123
Creator III
Creator III
Author

Thanks for the expression..