14 Replies Latest reply: Jan 26, 2016 4:39 PM by James Parham RSS

    Return a dimension from expression(set analysis)

    James Parham

      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