Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
You can use either use
=Sum( If( Status = 'A', Amount))
or with a set expression
=Sum( {<Status = {'A'}>} Amount)
Hi Donald,
Try like this using Set Analysis
=Sum( {<Status = {'A'}>} Amount)
Regards,
Jagan.
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
Awesome, thanks.