Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Return a dimension from expression(set analysis)

I'm trying to create a dimension for customer numbers that did not have any sales the previous year.  I'm new to Qlik so please excuse me if this is a stupid question. 

Customer Number
CY Sales
PY Sales

1

100020000
21000000100000
320000
43000000

I tried using an if statement, but it said that it was an invalid dimension. Here's the if statement:

if(sum({<[Year]={$(=max([Year])-1)}>} EXTSHIPAMT)=0,CUSTNUM)

I'm assuming there's a function that does this, I'm just not aware of it.

Any help is appreciated!

Thanks,

James

14 Replies
Not applicable
Author

It still summed up the null values. 

sunny_talwar

What if you try this for me:

Sum({<[Year]={$(=max(Year)-1)}, [New Account] = {"=Len(Trim([New Account])) > 0"}>} If(Aggr(Sum({<[Year]={$(=max(Year)-1)}>} If(STATUS=31,-1*EXTSHIPAMT,EXTSHIPAMT)),[Cust Name])=0, 0, If(STATUS=31,-1*EXTSHIPAMT,EXTSHIPAMT)))

Not applicable
Author

Same thing.

sunny_talwar

You won't be able to share a sample?

Not applicable
Author

I'm actually not sure how to share a sample.