12-23-2022, 01:03 PM
How to show calculated field from tooltip?
Add this in dashboard script:
sdk.calculation = sdk.calculation || {};
sdk.setContext( 'main33', 0 );
sdk.calculation.getfiltered= function(f1, f2){
if(f1 ==0){
return sdk.getContext( 'main33' );
}else{
sdk.setContext( 'main33', Math.abs(f1-f2) );
return (Math.abs(f1-f2));
}
};
Add this in calculation script area:
sdk.calculation.getfiltered(column_name );
Add this in dashboard script:
sdk.calculation = sdk.calculation || {};
sdk.setContext( 'main33', 0 );
sdk.calculation.getfiltered= function(f1, f2){
if(f1 ==0){
return sdk.getContext( 'main33' );
}else{
sdk.setContext( 'main33', Math.abs(f1-f2) );
return (Math.abs(f1-f2));
}
};
Add this in calculation script area:
sdk.calculation.getfiltered(column_name );