on ‎2020 Aug 11 8:48 PM
I have a Customer MDT (BBCUSTOMER) with a key of CUSTID.
I then created a reference MDT based on BBCUSTOMER for Distributor (BBDISTRIBUTOR) with a key of ZDISTRID whose referenced attribute is CUSTID.
The planning level created is MTHPRODCUSTDISTR - it includes both of these MDTs.
I then have a Key Figure (Total Gross Sales Units) that is at PL MTHPRODCUSTDISTR. In one of the calculations for this key figure, I want to be able to check the value of ZDISTRID - but when I edit the calculation, it does not recognize the ZDISTRID attribute.
Does anyone have any idea of what is causing this issue?
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi Susan,
Can you try splitting the calculation as below?
ZTOTALDELIVQTY@MTHPRODCUSTDISTR = IF("ZDISTRID" =''0'',"ZTOTALDELIVQTY@MTHPRODCUSTDISTR",0)
[Double quotes for attribute and two single quotes for attribute value]
And then another calculation definition to sum it up at required level as below:
ZTOTALDELIVQTY@MTHPRODCUST = SUM("ZTOTALDELIVQTY@MTHPRODCUSTDISTR")
Once you validate and save key figure, try to perform planning area check and see you get any errors related to this key figure.
Hope this helps!!
Regards,
Piyush
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Splitting the calculation was the answer. It now works as designed.
Thank you very much for your assistance.
Unfortunately, the last time I included the screenshots, they did not stay included. I will try again. But, as it will not submit when I put this information in the Comments portion, I am trying in the "Your Answer" section.
I am using the double quotes around the name of the attribute and two single quotes around the value I am checking. I have done attribute checking in the past and have had no issues.
*** I am thinking that the issue may be that I am trying to check an attribute that is part of a reference master data type.
Below are screenshots which will hopefully stay with this entry.
MASTER DATA TYPE:

KF CALCULATION
When I am entering the calculation, the name of the attribute (ZDISTRID) does not show up in the dropdown list of suggested entries (as it does other times when I have referenced an attribute in a calculation):

This is what the calculation looks like before I click on Validate -

SUM(IF("ZDISTRID" =''0'',"ZTOTALDELIVQTY@MTHPRODCUSTDISTR",0))
This is what it looks like after I click Validate (quotes are removed and the attribute name is all in black - where it usually is in purple and the double quotes remain) -

ZTOTALDELIVQTY@MTHPRODCUST = SUM(IF(ZDISTRID =''0'',"ZTOTALDELIVQTY@MTHPRODCUSTDISTRî‚€",0))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Susan,
Can you share the KF screenshot? You need to use double quotation mark for attribute and two single quotation marks around attribute value in key figure expression.
Regards,
Piyush
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is how a calculation that is working referencing an attribute appears - the attribute, CUSTID, is in purple and surrounded by double quotes.
Here is the Total Gross Sales Units KF - though I put the attribute in double quotes, it removed them and the attribute is just listed in black
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Susan,
Please use attributes surrounded by double quotation marks in the calculation expression. For example "ZDISTRID". However unlike KF, attributes names won't popup in KF calculation box.
Can you please confirm if the calculation for KF "Total Gross Sales Units" is working as expected?
Refer below link for more details.
In case of further queries, please provide snapshot of KF calculation.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 16 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.