Symptom
- Error: Mismatched input “\n” expected “}”. Try rewriting the formula.
- Unable to create a Calculated Meaure or Calculated Dimension in Lumira.
-
When attempting to create a Calculated Measure in Lumira, it fails with the following error when using specific key figure in the formula:
"Error: Mismatched input “\n” expected “}”. Try rewriting the formula."
Environment
- SAP Lumira Desktop 1.27 and above
- SAP BW
Reproducing the Issue
- In BEx Query Designer, create a BEx Query and set the name of a Key Figure with a carriage return in it, so the name appears on 2 lines.
- In SAP Lumira Desktop, connect to the SAP BW BEx Query that contains a Key Figure with a name with a carriage return in it.
- Create a Calculated Measure or Dimension using the Key Figure that contains a carriage return in it’s name.
- When attempting to save the Calculated Measure or Calculated Dimension, it fails with the error:
"Error: Mismatched input “\n” expected “}”. Try rewriting the formula."
Cause
- This situation occurs because the name of the Key Figure contains a carriage return and display the field name on 2 lines in the formula. The formula editor does not find the ending tag for the Key Figure field name, and therefore generates an error.
- This issue has been tracked under SAP Note 2231458
Resolution
-
The issue is currently under investigation by Development.
- To workaround this issue, remove the carriage return in the name of the Key Figure in the BEx Query.
- In BEx Query Designer, open the BEx query that contains a Key Figure with a name with a carriage return.
- Under the tab "Rows/Columns" select the Key Figures that contains a name with a carriage return.
- Under the "Properties" pane, under the tab "General", for "Description", remove the carriage return character from the Key Figure name.
- Save the BEx Query.
After performing the above change, it will now be possible to create a Calculate Measure, or Calculated Dimension in Lumira using the Key Figure, as it no longer contains a carriage return in it's name.
Keywords
Lumira, Error in formula, Line Feed, Carriage Return , KBA , BI-LUM-DIS , Lumira Desktop/Discovery , Bug Filed
Product
SAP Lumira, desktop edition 1.0