Hi I am new to business objects. My question is how do created a variable that returns unique measures based on an object. I know there are functions min and max that returns the smallest and largest measures, but what if I want the third value or the fourth measure. Any help would be greatly appreciated thanks. It a webi report.
Not quite as easy as it should be. This is best illustrated with an example. I'll create a sample report from Island Reports Marketing, and include Country
, Service
, and Revenue
. Let's say we want to get the third-lowest Service Revenue by Country:
So we want to see 32,640 for France, and 73,280 for US. We remove the Service
column from the report, and change the formula for the Revenue column to:
=[Revenue] In ([Country];[Service]) Where ((Rank([Revenue];[Service];Bottom;[Country]))=3)
This produces:
If you want to see the Service that's associated with the ranked Revenue, you have to create a similar formula. Drag Service back into the report, and change its formula to:
=[Service] Where ((Rank([Revenue];[Service];Bottom;[Country]))=3)
This produces:
(if you left it as [Service], you would get all values, but all rows other than Restaurant and Poolside Bar would have a blank Revenue)
To display a different nth ranked value, just change the "3" at the end of each formula. Remove ;Bottom
to rank from highest.