on 2016 Feb 18 10:13 AM
Hello,
I have implemented a MDX-formula which looks like [PERCENTAGE]*[AMOUNT];SOLVE_ORDER=2
Now it works like that:
1. Sum all percentages from all companies
2. Sum all amounts from all companies
3. Multiply sums
How I want it to work:
1. Multiply percentage and amount for each company
2. Sum multiplied data from step 1 from all companies
Is there any way to do it?
Request clarification before answering.
Hi Oleksandr!
No, the dimension formula will never work like you want
You have to create a script to store the multiplication result for each base company (may be in default.lgf):
*WHEN ACCOUNT
*IS AMOUNT
*REC(EXPRESSION=%VALUE%*[ACCOUNT].[PERCENTAGE],ACCOUNT=AMOUNTPERC)
*ENDWHEN
*WHEN ACCOUNT
*IS PERCENTAGE
*REC(EXPRESSION=%VALUE%*[ACCOUNT].[AMOUNT],ACCOUNT=AMOUNTPERC)
*ENDWHEN
And you can create special member to calculate percent:
PERCENTAGECALC
IIF([AMOUNT]=0,NULL,[AMOUNTPERC]/[AMOUNT])
This formula will show effective percent on parent company...
Vadim
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"that's a shame" - ??? Why?
The dimension member formulas are calculated when requested by report for each member used in the report. It's by design! And dimension member formulas are used to calculate ratios, it's the only way to get correct figures on parents.
And simple calculations in default.lgf will not seriously affect saving performance (we use calculations like this for years...)
Vadim
| User | Count |
|---|---|
| 7 | |
| 7 | |
| 6 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.