cancel
Showing results for 
Search instead for 
Did you mean: 

Component to display percentage value

Former Member
0 Kudos

Hello experts,

I need to add a chart/component in my application which will display a single numeric value(percentage format) based on a single keyfigure.

I don't need anything in x-axis or y-axis.Just the percentage value to be displayed.

Please help.

I am a beginner in SAP BO design studio.Any help would be appreciated.


Thanks,

Varsha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Varsha,


We had a similar requirement  wherein we had to display a single numeric value as a Value / Percentage. So we developed a custom component which could do this. We also added quite a few formatting options like changing the no. of decimal places etc. Following are some screenshots of what we had developed:



This is also available as part of our Design Studio Custom Extensions Suite ( DSX ) - http://visualbi.com/sap-design-studio/dsx-extensions/


Best Regards,

Sesha

Former Member
0 Kudos

Hi Sesha,

I used the text box to display the percentages.This text box would pull values from the keyfigure on start-up, thus displaying percentages at run-time.

Thanks anyways for the help.

Regards,

Varsha Nalkur

RamKuzhipully
Associate
Associate
0 Kudos

Hi Varsha,

Can you share how you got the percentage on the text box. I have a similar requirement.

Thanks

Ram

Former Member
0 Kudos

Hi Ram,

Script would be like this:

var sales=DS_1.getData("Sales",{"BG":LISTBOX_BG.getSelectedText()}).value;

TEXT_1.setText(Convert.floatToString(sales,"#,##0.0")+"%");

Best,

Alfred

christian_key2
Participant
0 Kudos

Hi Alfred,

I am trying your above solution but it's not quite working for me. I wish to display a calculated value that is a percentage in a text box along with some text. I am using Design Studio 1.6.

My source data from a universe is this:

My global script function called 'pct' is this:

var Complete = NUM_ACCREDITATIONS_STATUS.getData("OBJ_299", {"OBJ_122":"Complete"}).value;

var Total    = NUM_ACCREDITATIONS_STATUS.getData("OBJ_299","OBJ_122").value;

var Percent  = (Complete / Total) * 100;

var formattedText = "Your MAST compliance is: " + Convert.floatToString(Complete,"#,##0.0")+"%";

return formattedText;

I now wish to output the formattedText value in a text box TEXT_1 so I have set up an On Startup Event as follows:

When I execute the application the text value is not being displayed in the text box.

What am I missing?

Thanks,

Chris

Answers (1)

Answers (1)

TammyPowlas
Active Contributor
0 Kudos

Please try using the KPI tile, which comes with the Design Studio SDK templates - see the help at SAP BusinessObjects Design Studio 1.4 – SAP Help Portal Page