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: 
Not applicable

Set Analisys condition with table field

     Hi all,

     I would like use "set analisys" instead of "if" funcion.

     I would like to check another  field in same table !!!  see "{Date2}  "

   

     Example:

    

     Orders:

     LOAD * INLINE [
    Customer,           OrderDate,           Article,       Qty,              Date2
    000001,           20-01-2011,     FFF200,         50,      20-01-2014,
    000002,           21-02-2012,     GGG120,      300,     20-01-2013,
    000003,           22-03-2013,     HHH140,     1200,     20-01-2011,
    000004,           02-02-2014,     RRR120,     1500,     02-02-2014,
    ]

( {$<OrderDate =  {'>=$(vData1)<=$(vData2)'}     , OrderDate =  {Date2}                    >} [Qta])

  Many Thanks in advance

  Claudio

1 Solution

Accepted Solutions
agilos_mla
Partner - Creator III
Partner - Creator III

You should add a recno() as OrderID in your table( because the searched dim cannot be used in the boolean expression),

then it will allow to write sthg like

sum({$<OrderDate =  {'>=$(vData1)<=$(vData2)'}, OrderID={"=(OrderDate=Date2)"}>} [Qta])

HTH,

Michael

View solution in original post

4 Replies
MK_QSL
MVP
MVP

( {$<OrderDate =  {'>=$(vData1)<=$(vData2)'}     , OrderDate =  {'$(=Date2)'}                    >} [Qta])

agilos_mla
Partner - Creator III
Partner - Creator III

You should add a recno() as OrderID in your table( because the searched dim cannot be used in the boolean expression),

then it will allow to write sthg like

sum({$<OrderDate =  {'>=$(vData1)<=$(vData2)'}, OrderID={"=(OrderDate=Date2)"}>} [Qta])

HTH,

Michael

Not applicable
Author

As Michaël Laenen, you need another thirs field to do a boolean expression. Use Customer as this third field.

See a doc I have written on Set Analysis, it can help you:

http://community.qlik.com/docs/DOC-4951

Fabrice

Not applicable
Author

Many thanks at everybody,

Works perfetclty.

@Fabrice

Nice Manual very userful