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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
pashok75
Contributor II
Contributor II

How to make a count on expression based on a formula

Dears,

I have one scenario wherein I need to get a count based on the following

N - 10

R - 5

C - 2

The formula to get the count will be (N + R - C)

(Count(DISTINCT{<T_PREM_TYPE={'N','R'}>}, T_POL_NO))- Count({<T_PREM_TYPE={'C'}>}, T_POL_NO)))

The values N, R, C is T_PREM_TYPE

T_POL_NO is the field value i need to do the sum.

Ashok

1 Solution

Accepted Solutions
Anil_Babu_Samineni

Expression, Wrong with extra comma, May be this?

Count({<T_PREM_TYPE={'N','R'}>} T_POL_NO) - Count({<T_PREM_TYPE={'C'}>} T_POL_NO)

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

View solution in original post

1 Reply
Anil_Babu_Samineni

Expression, Wrong with extra comma, May be this?

Count({<T_PREM_TYPE={'N','R'}>} T_POL_NO) - Count({<T_PREM_TYPE={'C'}>} T_POL_NO)

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