SAP Knowledge Base Article - Public

3124680 - SAC AD - How to convert and calculate a value from InputField ?

Symptom

  • In calculations with value X, the "Store A" is set to have 80% of X and the "Store B" is set to have 20% of X.
  • X can start with 100, meaning Store A = 80 and Store B = 20.
  • How to get a field on the page that allows the user to change the value of X and to have Store A and B calculated depending on the new value?

Environment

  • SAP Analytics Cloud - Analytics Designer

Resolution

The solution is to get :
- 1 InputField (where we can enter a value)
- 1 Button to calculate (which retrieves the inputvalue and convert it to number, using the function ConvertUtils.stringToNumber)
- 2 Texts to store the values calculated respectively for 80% and 20% of input value

Calculation_InputField.jpg

Keywords

ConvertUtils.stringToNumber, applyText , KBA , LOD-ANA-AD , Analytics Designer , Problem

Product

SAP Analytics Cloud all versions