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: 
mithunr40
Contributor III
Contributor III

Set Analysis: len() & right()

How to calculate the number of employees whose PHONE_NUMBER consists of 12 symbols and ends with number '8'. They given me the fields and functions to use in set analysis: EMPLOYEE_ID, PHONE_NUMBER, len(), right().

They want this expression in set analysis, we can't use logic in backend.

I have written an expression but in this only one function only working.

count({<PHONE_NUMBER={"=len(PHONE_NUMBER)=12"},PHONE_NUMBER={"=right(PHONE_NUMBER,1)='8'"}>}EMPLOYEE_ID)

Please help me to solve this problem.

Thank you.

Labels (1)
1 Solution

Accepted Solutions
MayilVahanan

Hi

Try like below

=Count({<PHONE_NUMBER={"=Len(PHONE_NUMBER)=10 and Right(PHONE_NUMBER,1)=8"}>}DISTINCT EMPLOYEE_ID)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

2 Replies
MayilVahanan

Hi

Try like below

=Count({<PHONE_NUMBER={"=Len(PHONE_NUMBER)=10 and Right(PHONE_NUMBER,1)=8"}>}DISTINCT EMPLOYEE_ID)

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
mithunr40
Contributor III
Contributor III
Author

Thank you @MayilVahanan