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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Distinct in Expression

I am using the following Expression :

SUM(if(len( [Territory Name])> 0,if(len(KeepChar([Territory Name],'0123456789')) > 0,KeepChar([Territory Name],'0123456789'),1)))

How do I add Distinct [Territory Name] in this expression ?

Thanks

VENU

2 Replies
Not applicable
Author

hi

try this

SUM(Distinct if(len( [Territory Name])> 0,if(len(KeepChar([Territory Name],'0123456789')) > 0,KeepChar([Territory Name],'0123456789'),1)))

Not applicable
Author

hi

try this

SUM(if(len(Sum(distinct [Territory Name]))> 0,if(len(KeepChar(Sum(distinct [Territory Name]),'0123456789')) > 0,KeepChar(Sum(distinct [Territory Name]),'0123456789'),1)))