Skip to Content
author's profile photo Former Member
Former Member

Percentage calculation in conditional formaating ( KPI Tiles)

HI Gurus,

Need some help on Conditional formatting

Actually i need to some inputs for conditional fromatting for KPI Tiles .

I tried various blogs and i tried but not fullfilled my requirement

Design Studio Percent Of Total Calculation | SCN

Custom Measures (Calculations) SAP Design Studio 1.6

Actually i have calculation at bex level and i need to compare the value and apply CSS

i am not able to compare values and apply CSS it was thrwoing me error. Can any one point me ion right direction where i am going wrong

My Condition



Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 30, 2016 at 06:01 PM

    Hello Varun,

    Assuming that the getdataasstring() returns the percentage value as 7% from your datasource , have written a sample script to compare percentage values.


    var percent=DS_1.getDataAsString("Measure",{});//Replace your measure here

    var percent_remove=percent.split("%");

    var number_string="";

    percent_remove.forEach(function(element, index) {




    var number_int=Convert.stringToInt(number_string);



    APPLICATION.alert("Percentage less than 7");


    else if(number_int>7)


    APPLICATION.alert("Percenage greater than 7");


    else if(number_int==7)


    APPLICATION.alert("Percenage equals 7");





    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.