Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
knkirubakaran
Contributor III
Contributor III

Define the values based on date

Please help me to define Cust IDs based on Sales Date range. Please find the source data.

EX:

<= 1 Year = Active

>2 Year = Less Active

>3 Year  = Attention

imglo.PNG

1 Solution

Accepted Solutions
sunny_talwar

May be this

Table:

LOAD [Cust ID],

    [Sales ITM],

    [sales date],

    If([sales date] >= AddYears(Today(), -1), 'Active',

    If([sales date] >= AddYears(Today(), -2), 'Less Active', 'Attention')) as Flag

FROM

[..\..\Downloads\Inventry.xlsx]

(ooxml, embedded labels, table is Sheet1);

View solution in original post

3 Replies
Anil_Babu_Samineni

May be Buckets or Nested IF Statements

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunny_talwar

May be this

Table:

LOAD [Cust ID],

    [Sales ITM],

    [sales date],

    If([sales date] >= AddYears(Today(), -1), 'Active',

    If([sales date] >= AddYears(Today(), -2), 'Less Active', 'Attention')) as Flag

FROM

[..\..\Downloads\Inventry.xlsx]

(ooxml, embedded labels, table is Sheet1);

tresesco
MVP
MVP

Try like:

if(age(Today(),  [sales date])<=1, 'Active',(if(age(Today(),  [sales date])<=2, 'Less Active', 'Need Attention'))) as Flag