Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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)))