Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
rmdnkevin
Contributor III
Contributor III

Add / Make a Calculated Field

Hi, everyone.

I have a table view like this :

Screenshot_11.png

And I need to make a field when I joining those 2 tables with this expression :

(Count( {<status={'Email Sent'}>}  status) + Count( {<status={'Email Opened'}>}  status) + Count( {<status={'Clicked Link'}>}  status) + Count( {<status={'Submitted Data'}>}  status)) ; CountofEmailSent as the name of new field

How can I make a calculated field with that expression ?

Thank you

- Kevin

3 Replies
Anil_Babu_Samineni

Why you want to have in script? instead UI is easy to do. And that too Set analysis won't consume much performance.

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
sunny_talwar

And you want to do this in the script? Can you share some raw data and provide what do you wish to see as an expected output?

neelamsaroha157
Specialist II
Specialist II

May be you can create an additional table in your model as

Load PrimaryKeyField

Count(PrimaryKeyField)

Resident 20180612

where Match(Status, 'Email Sent', 'Email Opened','Clicked Link','Submitted Data')

group by PrimaryKeyField;


Replace PrimaryKeyField with ID or ID+Date field.

OR

You can simply create a flag for all the mentioned status and count them in front end.