# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Highlighted
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
Partner

## 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
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

Partner

## 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)

New Contributor III

## Re: KPI selective sum

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

Contributor II

## Re: KPI selective sum

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

Contributor II

## Re: KPI selective sum

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