Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone.
I have a script in my model that should calculate the "%" = "Debt1/Debt Total" and this "%" should be included as a dimension next to "Debt1" and "Debt Total", but I can't make that the code realice the division. Please, could you help me?
Attached is the example model with the script.
Thanks
I am not exactly sure what you are looking for... Would you be able to point out where exactly are we looking?
Best,
Sunny
I need that table in Page "Weekly AR by Area" (my example model is attached in main message) does the correct calculation of %over 14 and %over 180.
Taking Chile as example, now I have this:
and I should have this (can you see the error in %over 14 and %over 180?:
TW_Var | Area | SubArea | 201701 | 201652 | 201651 | 201650 | 201649 |
Account Receivable | CHILE | CHILE | 4,757 | 4,757 | 4,757 | 4,757 | 4,757 |
Account Receivable | Grand Total | 4,757 | 4,757 | 4,757 | 4,757 | 4,757 | |
Over 14 Days | CHILE | CHILE | 4,365 | 4,365 | 4,365 | 4,365 | 4,365 |
Over 14 Days | Grand Total | 4,365 | 4,365 | 4,365 | 4,365 | 4,365 | |
Over 180 Days | CHILE | CHILE | 1,271 | 1,271 | 1,271 | 1,271 | 1,271 |
Over 180 Days | Grand Total | 1,271 | 1,271 | 1,271 | 1,271 | 1,271 | |
%Over 14 Days | CHILE | CHILE | 91.75 | 91.75 | 91.75 | 91.75 | 91.75 |
%Over 14 Days | Grand Total | 91.75 | 91.75 | 91.75 | 91.75 | 91.75 | |
%Over 180 Days | CHILE | CHILE | 26.72 | 26.72 | 26.72 | 26.72 | 26.72 |
%Over 180 Days | Grand Total | 27 | 27 | 27 | 27 | 27 |
The calculations of % are OK, but the problem occurs when I drill up into the dimensions because at customer level the % is OK, but when I check by country the % of country is the sum of % of customer and should by a calculation not sum...
How are you getting this 91.75 number? and 26.72? I am trying to understand the logic behind this.... Are you looking for a change in the script or on the front end? or are you looking to apply a totally new approach? I guess I am still trying to figure out your requirement
Do you review my script?, in the tab "Tabla1" is the calculation of every "variable". The calculation at bottom level is OK, my problem is when aggregate the Variable dimension, because most of your values are summarized but I have these 2 "variable": "% over 14" and "% over 180" which aggregate calculation is not sum(), these should be apply the formula of the script for their aggregation.
Am I clear?
Attached in the mail mesage is my example model with script included.
thanks !