02-12-2024 3:29 PM - edited 02-15-2024 2:07 PM
Hi
I am calculating new KF Sales_Input from two KFs which are different aggregation levels, But my code is not populating new KF value.
Dimensions Territory Office, Mat Line, Mat Group are multiple selections by user dynamically, hence I couldn't filter in Member selection.
I need to populate new KF (Sales_Input) at MatGroup level. Any help on this highly appreciate.
Regards,
Vasu
Note: Please do not post code block as image. Please provide your code as text so that community can help better.
Your code block should be structured as below. This is assuming that both Sales Forecast and Dales Output are available at same data intersection of other dimensions.
You did not specify at what Material Group the Sales Forecast is stored. If its on each Material Group and you need to add them together then below code will need adjustment as highlighted.
Dimensions Territory Office, Mat Line, Mat Group are multiple selections by user dynamically, hence I couldn't filter in Member selection. - This is the selection for the report but I assume your calculations should happen for all members of these dimensions.
MEMBERSET [d/Date] = (%Date_Input%)
MEMBERSET [d/CompCode] = (%CompCode_Input%)
MEMBERSET [d/SalesGroup] = (%SalesGroup_Input%)
MEMBERSET [d/CustType] = (%CustType_Input%)
MEMBERSET [d/Measures]=("Sales_Forecast", "Sales_Output")
VARIABLEMEMBER #TotalMG of [d/MatGroup]
DATA([d/MatGroup]=#TotalMG)=RESULTLOOKUP([d/Version] = "public.Actual",[d/Measures]="Sales_Forecast",[d/MatGroup]="#") // Remove the bold part if SF is on individual MG like MG1 , MG 2 and you need to aggregate else if its on MG # you can keep the code block as is
DATA([d/Measures]="Sales_Input")=(RESULTLOOKUP([d/Measures]="Sales_Output")/RESULTLOOKUP([d/MatGroup]=#TotalMG,[d/Version] = "public.Actual",[d/Measures]="Sales_Forecast"))*100
Br.
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
11 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.