Selecting values from the interval using IF
Posted: Sun Dec 23, 2012 8:40 am
Hello,
I have some problems with select value from the interval through two cubes.
1, cube (Discounts) contains these dimensions: Intervals and Intervals metric (in context are Suppliers and Materials)

2, cube (Amount selection) contains these dimensions: Materials and Materials metric (in context are only Suppliers)

Now i want that when i will write some amount one material. Then I want obtain the price from a given interval, where the quantity is. This is a discount system.
For this problem i used this IF:
['price']=IF((DB('Discounts',!Intervals,!Suppliers,!Materials,'from')<['amount'])&(DB('Discounts',!Intervals,!Suppliers,!Materials,'to')<['amount'])<['amount']),DB('Discounts',!Intervals,!Suppliers,!Materials,'Price'),0);
(this rule is written in a cube "Amount selection")
Unfortunately it does not work but I think it should: D.
All this is done in the Performance modeler and Architect (10.1.1)
Thx for help guys.
I have some problems with select value from the interval through two cubes.
1, cube (Discounts) contains these dimensions: Intervals and Intervals metric (in context are Suppliers and Materials)

2, cube (Amount selection) contains these dimensions: Materials and Materials metric (in context are only Suppliers)

Now i want that when i will write some amount one material. Then I want obtain the price from a given interval, where the quantity is. This is a discount system.
For this problem i used this IF:
['price']=IF((DB('Discounts',!Intervals,!Suppliers,!Materials,'from')<['amount'])&(DB('Discounts',!Intervals,!Suppliers,!Materials,'to')<['amount'])<['amount']),DB('Discounts',!Intervals,!Suppliers,!Materials,'Price'),0);
(this rule is written in a cube "Amount selection")
Unfortunately it does not work but I think it should: D.
All this is done in the Performance modeler and Architect (10.1.1)
Thx for help guys.