# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor II

## Sum Logic

I actually getting total as 30. Is there any way to show as 15, based on Date.

 Date Value status 9/13/2017 5 OK 9/13/2017 5 NOK 9/14/2017 5 OK 9/14/2017 5 NOK 9/15/2017 5 OK 9/15/2017 5 NOK Total 15
Tags (2)
1 Solution

Accepted Solutions
MVP

## Re: Sum Logic

May be this

If(Dimensionality() = 0, Sum({<status = {OK}>} Value), Sum(Value))

11 Replies
Contributor II

## Re: Sum Logic

For the Date 09/13/2017 -  value is 5

09/14/2017 -  value is 5

09/15/2017 -  value is 5, So the Total - 15

MVP

## Re: Sum Logic

if you only want OK status, with set analysis

sum({\$ <status={OK}>} Value)

Contributor II

## Re: Sum Logic

I need both Status

MVP

## Re: Sum Logic

if(Dimensionality()=0,

sum(aggr(sum(DISTINCT Value), Date)),

sum(Value))

MVP

## Re: Sum Logic

May be this

If(Dimensionality() = 0, Sum({<status = {OK}>} Value), Sum(Value))

Contributor II

Thank you Sunny.

Contributor II

## Re: Sum Logic

Also, I need the difference for Value based on Date,

For 09/13/2017 & 09/14/2017, tghe difference is 0(Zero).

MVP

## Re: Sum Logic

In a new column? May be this

Aggr(Sum(Value) - Above(Sum(Value)), status, Date)

Contributor II

## Re: Sum Logic

But my requirement,

If the value for 09/13/2017 - 5

and the value for 09/13/2017 - 6. The difference is 1 and it is higher than the previous date. Is there any way to highlight the difference by symbol like (^ or v) increased/decreased?