Skip to Content
0

Return the second value on a list SAP BO Report

Apr 19 at 11:54 AM

53

avatar image

Hi all,

I need a variable/function which can return the second value on a list.

For instance, when I need the first value (in this specific case it'll be the first week of the year when I have productions of a specific material), I use this function: Min([Week -year]) In ([Material - Key].


And now, what should I use for the second value (second week of production of that material)?


Thank you!!

10 |10000 characters needed characters left characters exceeded

what is your BO version?

0

SAP BusinessObjects BI Platform 4.1 Support Pack 6 Patch 3
Version: 14.1.6.1805

Thank you!

0
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Patrícia Costa Apr 19 at 11:57 AM
0

To return the 1st value, I know that the function Min() and the function First() are equivalent.

Share
10 |10000 characters needed characters left characters exceeded
James Barlow Apr 23 at 01:27 PM
0

Is the Week / Year object simply the Week number (measure) object?

Show 1 Share
10 |10000 characters needed characters left characters exceeded

yes! It is

0
James Barlow Apr 24 at 10:57 AM
0

I one possible way of doing this (it is convoluted and i'm sure someone else will come up with something far more efficient)

Query objects:

Material Key (dimension)
Amount
Week No.

1. I created a new variable [WK2] defined as a dimension using the formula =[Week No.]
2. I then used the formula: =Rank([Week No.]) In([WK2]) ranks the week numbers by themselves.
3. Next column : =Max(Rank([Week No.]) In([WK2])) - Rank([Week No.]) In([WK2]) This returns the highest ranked Week No. value (the
lowest actual week number) and subtracts the week no. ranking value from it.
The second lowest Week No. rank value will always return a value of 1 from this formula.

4. I defined the formula in step 3 as a variable [Flag] it has to be a measure object.
5. I then created another variable [F2] (defined as a dimension) using the formula =[Flag]

6. You can now filter on [F2] - select 1 from the list of values.


rank.png (95.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
Patrícia Costa May 08 at 02:08 PM
0

Thank you, James,

The problem here is I don't have production with a specific material every week, so I don't need the needs from the Week 2, what I really need is the needs (by needs I mean qtt of material consumption) on the second week of production. So, it's like the second value on a list.

Am I being clear? :S

Thank you

Share
10 |10000 characters needed characters left characters exceeded
Patrícia Costa May 08 at 02:08 PM
0

Thank you, James,

The problem here is I don't have production with a specific material every week, so I don't need the needs from the Week 2, what I really need is the needs (by needs I mean qtt of material consumption) on the second week of production. So, it's like the second value on a list.

Am I being clear? :S

Thank you

Share
10 |10000 characters needed characters left characters exceeded