# Cheapest price or minimum function

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

• # Cheapest price or minimum function

Hi everyone,

i have a cube with the following dimensions:

member
year
article
facts

in the facts dimension i have an element "price"

From each member we get an information about the price for an article every year.

Because the articles differ between the members, there are zero-values in the cube.

If we get the cube in a table (paste view in palo for excel) it could look like this

year: 2011

Article Member A Member B Member C

4711 0 1.23 2.34
0815 1.11 1.15 0
4712 2.22 2.33 2.44

Is it possible to create a rule that fills the element "cheapest price" (in the facts dimension?) with the minimum of each members price (greater than 0) for every article so the result will look like this:

Article Member A Member B Member C cheapest price

4711 0 1.23 2.34 1.23
0815 1.11 1.15 0 1.11
4712 2.22 2.33 2.44 2.22
?

Is it possible to do this by a rule?

Kind regards

Holger
• Hi,

maybe it'll cheer you up a little to hear, that a function for that will be implemented in 3.3.

A possibility would be calculating that value during ETL ...

Regards.
Robert Tischler
Senior Consultant Vector SW DV GmbH
• extended consolidation functions, right ?

average, max, min, count...

sounds great
laloune

Post hoc, non est propter hoc
• Yess. I'm also quite curious!
Robert Tischler
Senior Consultant Vector SW DV GmbH
• Hi Holger,

You could use a rule similar to the following to calculate a value for 'cheapest price':

### Source Code

1. ['cheapest price'] = N: MIN(['Member A', 'price], ['Member B','price'], ['Member C', 'price'])

Hope this helps.

Rod