Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
luca_bellotti
New Contributor III

KPI selective sum

Hi everyone,

I'm a newbie to Qlik Sense Desktop.

I have an app and a KPI that sum sales (measure) of all the departments (dimension).

There are certain departments that ar null but have sales. I would like not to sum those sales.

Here's the table:

DepartmentShopMonthSales

A

a1jan10
Ba2jan10
Ba3jan10
nullb1jan10
Aa5jan10

My KPI object shows 50. How can I not consider the null department, and show 40?

Thanks to everyone.

Tags (3)
1 Solution

Accepted Solutions
agigliotti
Honored Contributor II

Re: KPI selective sum

better if you replace null with string (ex. "n/a") in the script and use the expression as below :


Sum({$<[Department]-={"n/a"}>}Sales)

6 Replies
luca_bellotti
New Contributor III

Re: KPI selective sum

I've found a solution to my problem:

Sum({$<[Department]={"A"}>}Sales)+Sum({$<[Department]={"B"}>}Sales)

If somebody has a better solution feel free to share.

Thank you again.

Luca

agigliotti
Honored Contributor II

Re: KPI selective sum

better if you replace null with string (ex. "n/a") in the script and use the expression as below :


Sum({$<[Department]-={"n/a"}>}Sales)

Not applicable

Re: KPI selective sum

Try this

Sum({$<[Department]-={"null"}>}Sales)

luca_bellotti
New Contributor III

Re: KPI selective sum

Thank you Andrea, that's excatly what I was looking for.

kulwantsaj219
Contributor II

Re: KPI selective sum

sum({<Department={'*'}>}Sales) , this will only take non null values of department

kulwantsaj219
Contributor II

Re: KPI selective sum

sum({<Department={'*'}>}Sales) , this will only take non null values of department

Community Browser