Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If then statement

Status
Not open for further replies.

jvaneert

MIS
Sep 10, 2002
18
0
0
NL
Hello,

I have a report like

Modelno Period value
2000 200304 10
200305 10
200308 10
2010 200307 20
200309 20

I want Impromptu to look wether the modelnumber is launched after periode 200307 or not. If so i want to call it "new" other "old product".

The expected values would be

Modelno Period value Kind of product
2000 200304 10 Old product
200305 10 Old product
200308 10 Old product
2010 200307 20 New product
200309 20 New product

Which If the statement should i use? Or is there another workaround? I am using Impromptu 7.1

Regards

Jules
 
Jules,
Your suggestion of IF..THEN..ELSE would seem right in the circumstances
IF Period <= &quot;200307&quot; THEN &quot;Old Product&quot; ELSE &quot;New Product&quot;

However, can you be certain that all the periods relating to each product will truly reflect its launch date?

lex
 
Dr Lex,

I think your suggestion wont work because it will mark the last period for Modelno (200308) as &quot;New Product&quot; but as you can see the first period is 200304 so &quot;New Product&quot;should be overruled with &quot;Old product&quot;.

Do you know how to overrule?

And the first period is truly the launch date.

Regards
 
Jules,
My fault, I didn't read your data properly. Since the launch date must be the earliest date recorded, use the summary 'minimum' period for product in order to set the product kind
Kind of product - amended field:
If minimum (period) for product <= &quot;200307&quot; then &quot;old product&quot; else &quot;new product&quot;
apologies
lex
 
lex,

Thanks! I couldnt think of this syntax ;-(
BTw No offense

regards

Jules
 
jules,
you're welcome;
BTw none taken - I _must_ learn to read things twice and save myself some embarrassment.
lex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top