Hi All,
This document helps you to set Decimal places with Percentage in design studio by using Script.
Requirement:-
Create a Column Chart which shows data in decimal places.
Steps:-
http://scn.sap.com/thread/3464895
5. So the alternative way to make decimal places by using script in Onstartup event.
6. For that we will drag text box on the Column chart, and assign default text (in decimal) for design view purpose
7. Go to Application =>Event => On startup
8. Write a script to convert result to decimal number.
9. Create a variable, assign data to it and use convert function to that variable. Assign value of result to text box.
10. Execute
11. While executing the Application it automatically pick the result from datasource. As I have assign 142.17 as default value in the text box in design mode, which automatically get updated by the Onstartup event on successful execution of dashboard.
12.Similarly for Percentages (%):
For example- If you want to show variance percentage between two column i.e. A and B
var ZYOY1_VARIENCE = (DS_1.getData("A", {}).value - DS_1.getData("B", {}).value) / DS_1.getData("A", {}).value * 100;
TEXT_PERCENTAGE.setText(Convert.floatToString(ZYOY1_VARIENCE,"#0.0")+ "%");
13. Similarly we can do for Variance(-):
For example- If you want to show difference between two column A and B
var ZYOY1_VARIENCE = (DS_1.getData("A", {}).value - DS_1.getData("B", {}).value)
TEXT_Variance.setText(Convert.floatToString(ZYOY1_VARIENCE,"#0.0");
Hope this helps....
Regards,
Tulika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
9 | |
7 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |