![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, Does anybody know if there's a way to save a value in something like a variable inside a mdx formula? For example, suppose that I have to do a divide by zero test, using an iif in the denominator, but this demoninator is calculated by a hard formula, so if I calculate it just for test if it's zero and then calculate it again in the denominator, if it's not zero, I spend double time (disconsidering the cache effect). A way I know but I don't know if it's the best option is to use a sum with a named set like: Sum({HARD_FORMULA} as HardFormulaSet, iif (HardFormulaSet.Item(0).Item(0) = 0, NULL, a / HardFormulaSet.Item(0).Item(0))) Thanks in advance, Vinicius Bellino |
![]() |
| Thread Tools | |
| Display Modes | |
| |