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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

KPI Question

I'm new to Qlik, I need to know how to create a KPI by summing an Amount field based on the value of another field.

for example, I want a KPI that sums Amount for only the Status = A.

KPI = 50

Line Amount Status

01    10.00      A

02    20.00      A

03    15.00      I

04     20.00     A

4 Replies
swuehl
MVP
MVP

You can use either use

=Sum( If( Status = 'A', Amount))

or with a set expression

=Sum( {<Status = {'A'}>} Amount)

jagan
Partner - Champion III
Partner - Champion III

Hi Donald,

Try like this using Set Analysis

=Sum( {<Status = {'A'}>} Amount)


Regards,

Jagan.

engishfaque
Specialist III
Specialist III

Dear Donald,

If you want to display Sum of Amount where Status = A then write down given below Expression in Text Object.

Expression:

=Sum ({<Status = {'A'}>} Amount) //Sum of Amount where Status = A

=Sum ({<Status = {'I'}>} Amount) //Sum of Amount where Status = I

=Sum ({<Status = {'A', 'I'}>} Amount) //Sum of Amount where Status = A, I

=Sum ({<Status -= {'I'}>} Amount) //Sum of Amount and Exclude Status = I


OR

If you are making a chart, then Add Status as a Dimension and Add Expression such as given above.

Kind regards,

Ishfaque Ahmed

Not applicable
Author

Awesome, thanks.