# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor

## Calculated dimension

Hi

I tried the following as a calculated dimension but its comes up as a invalid

if(sum({< Date = {">=\$(vStartDate)<=\$(vEndDate))"} >}[Sales])>0,

fldAccount,null())

I only want to show the Account where the sales are greater than 0.

Thanks

1 Solution

Accepted Solutions
Honored Contributor II

## Re: Calculated dimension

Hi,

You can try like this,

Dimension:

fldAccount

Measure:

sum({\$<Date = {">=\$(vStartDate)<=\$(vEndDate))"},Sales={">0"} >}Sales)

another way u can simply create calculated dimension like below

=aggr(if(sum({\$<Date = {">=\$(vStartDate)<=\$(vEndDate))"},Sales={">0"} >}Sales),fldAccount),fldAccount)

Thanks,

Deva

3 Replies
Honored Contributor II

## Re: Calculated dimension

Hi,

You can try like this,

Dimension:

fldAccount

Measure:

sum({\$<Date = {">=\$(vStartDate)<=\$(vEndDate))"},Sales={">0"} >}Sales)

another way u can simply create calculated dimension like below

=aggr(if(sum({\$<Date = {">=\$(vStartDate)<=\$(vEndDate))"},Sales={">0"} >}Sales),fldAccount),fldAccount)

Thanks,

Deva

New Contributor II

## Re: Calculated dimension

Hi,

I got the same kind of requirement,

can you try it below way in dimension:

If(sum({\$<[Expire_Date_Contract_Validity]={'True'} >}

internal_customer_name)>0, Avg ([Start_Date_Contract_Validity]),0)+

If(Count({\$<[Expire_Date_Contract_Validity]={'False'} >}  %CaseId)>0,

Avg([Start_Date_Contract_Validity]), 0)

Contributor

## Re: Calculated dimension

Thanks

that worked are quite well.