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
Thanks,
Varun
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) {
number_string=number_string+element;
});
//APPLICATION.alert(number);
var number_int=Convert.stringToInt(number_string);
if(number_int<7)
{
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");
}
---------------------------------------------------------------------------------------------------------
Regards
Dinesh
Add a comment