Rule only partially working
I have a rule that is only partially working. The rule itself contains a great many calculations in an entity that has approximately 600 members to emulate an existing calculation. Simply put, some of the calculations in the rule are calculating correctly, and some are not (it matters not whether the rule for the line item is a simple sum or a more complex formula).
I have already done the following:
- Made sure that the cube (all dimensions) in which the rule is being applied is dense versus sparse.
- Reviewed the rule in detail to make sure there are no errors.
I've had other rules where calculations would not work as some formulas were dependent upon other formula, but this isn't the case here. For the most part, most of the calculations that aren't working are simple sums.
I have attached the exported rule and to me it looks fine, but I defer to those with more experience. Any thoughts on why this might be happening?
Accepted Answer
-
Hi Mike, having had a quick glance at your rule I notice a number of your calculations are using a divide by but aren't using the IFERROR() function, this means that if the divisor is zero you'll get a divide by zero error and not only will that calculation not work but neither will any subsequent calculations in the rule. Long story short you should try wrapping any calculation which involves division in IFERROR(<your calculation>,0), that way if the divisor is zero that calculation will simply return zero and won't break the rule.
Hope that helps!
Kind Regards,
Rob
0
Answers
-
Dear Mike Martin,
thanks for your request.
Just a short question. According the exported rule I assume you are sorting the entity, the rule is based on, by code, correct?
For that case is it possible, that there are some members inserted after you created the rule?
For that case please try the following.
1. Extract the rule (done)
2. Clear the rule and save
3. reload the rule using the import feature
Try if the rule is working again.
Hope it helps
regards
Alexander Kappes
0 -
Hi Alexander Kappes,
Thanks for these suggestions. Unfortunately, I already tried them ... I think I may see if I can figure out what is breaking the rule by building the rule again, and simply pasting in a certain number of formula at a time, saving the rule and seeing what is calculated and where, if at all, a specific formula is breaking the rule. It might help isolate the issue.
Any other suggestions?
Cheers!
0 -
Dear Mike Martin,
to be honest that would be also my case to investigate.
Another idea could be filling a cube for all not calculated items of the Rule Dimension.
When you insert this into DataView with "Show" all on Axis you directly can filter for the not calculated fields and only investigate this.
Perhaps this is little faster, I don´t know exactly.
regards
Alexander Kappes
0 -
Hi Rob,
Isn't IFERROR() a Nexel Function? I don't seem to be able to apply this correctly to a rule. If not, can you provide a sample or screenshot?
Mike
0 -
Hi Mike, no IFERROR() can be use in a rule, basically if your rule calculation is [A]/[B] you'd simply make it IFERROR([A]/[B],0), that way if [B] resolves to zero the divide by zero error is captured and replaced with a zero, instead of breaking the rule. Hope that helps.
0