Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
shamitshah
Partner - Creator
Partner - Creator

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
devarasu07
Master II
Master II

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

View solution in original post

3 Replies
devarasu07
Master II
Master II

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

rajendra1918
Creator
Creator

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)

shamitshah
Partner - Creator
Partner - Creator
Author

Thanks

that worked are quite well.