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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
n1ef5ng1
Creator
Creator

urgent_ how do i combine two fields and find distinct

Hi all ,

I have this two field names call first_user_ID and second_user_ID. do note that I cant do in script level due to complexity on this.

I would want to find out the # of distinct user based on the two fields.

how can i script in a way to find the expected output as below. basically is to concatenate second_id to first_id and find the distinct. however i have to do in expression level.

i.e

Capture.PNG

2 Replies
Anil_Babu_Samineni

If fields are same, I would ask you to use Rename the fields or Qualify and UnQualify statements in Script

Then, Count({<T1.second_id -= {"=Len(T1.second_id) >0"}>} T1.second_id)

Again, count(TOTAL T2.second_id)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

My bad, first one should this?

Count({<T1.second_id -= {' '}>} T1.second_id)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful