cancel
Showing results for 
Search instead for 
Did you mean: 

Assign value based on time

Former Member
0 Kudos

Hello buddies,

I have a SAP Business Intelligence report question.

I want to create a variable like this.

IN       CN       TIME     VARIABLE

1          101      00:52    P

1          102      00:58    C

1          103      01:25    C

2          104      00:58    C

2          105      00:51    P

I. E.  The variable will assign P value to the first time under lN

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi,

Taking 12345 as an example, is this how you want your report to be displayed?

CNINTIME RECEIVEDVariable
12341234508-02-2015 01:02C
12131234508-02-2015 01:02

P

16171234508-02-2015 01:26C
27281234508-02-2015 01:35C
29301234508-02-2015 01:50C

Regards,

Keerthan

Former Member
0 Kudos

Hi Amit,

Thank you for the reply but my condition is a little different.

Explaining the requirement again.

Following is the Data

CNINTIME RECEIVEDVariable
12341234508-02-2015 01:02P
12131234508-02-2015 01:15C
141511121307-02-2015 11:12C
151611121307-02-2015 11:36C
567867891008-02-2015 21:26P
16171234508-02-2015 01:26C
181911121307-02-2015 11:40C
202167891008-02-2015 22:10C
222311121307-02-2015 11:48C
242567891008-02-2015 22:10C
252611121307-02-2015 11:56C
910111121307-02-2015 11:02P
262767891008-02-2015 22:18C
27281234508-02-2015 01:35C
282911121307-02-2015 12:05C
29301234508-02-2015 01:50C

The variable has two components.

1) It will assign a text "P" to the first TR (according to Time) under a fixed IN

2) If TR are same then it will assign "P" to the first CN.

Rest all will be assigned "C"

Hope this helps.

Regards,

Amit

amitrathi239
Active Contributor
0 Kudos

Hi,

use this.

=If(First([CN]) In Report=[CN] Or (Last([CN]) In Report=[CN])) Then "P" Else "C"

Amit