on 05-16-2016 9:14 AM
Hello All
I am using a Text Box to display an Actual Value ( data bound to the data source). While applying conditional formatting using the same method I am unable to get the desired results if a target value is unavailable for a particular KPI
Below is a screenshot of the KPI tile
The conditional format logic is as below
if Target is available and Target > Value, number is Red
if Target is available and Target < Value, number is Green
if Target is unavailable, number is Grey
Below are the screenshots for the applied CSS and the data binding
I mapped another text box (TGT_PAGE2_OPS_PD_DP) to the Target cell for the KPI (data bound to the data source)
The KPI displayed above with a value of 11.41 has no Target available in the BEx query results.
The above logic sets the target variable as 0.0 instead of a blank string and hence applies Green colour instead of Grey (ContentNeutral)
I have looked at the below discussions, but none discusses a logic to handle unavailability of a target
We are using SAP Design Studio 1.5 and BEx query data source
Can anyone advise on how I can modify this logic?
Much appreciated
Regards,
Premdas
Hi Premdas,
I can understand your scenario.
You should verify the data cell as undefined before applying conditional formatting. Also, Use get data from data source in this case instead of getText from Text component. It should help you.
Your script should be like,
var target = DS.getdata ( <your data selection goes here .. > ) .value;
if( target == ' ' || target === undefined ) {
css = 'contentNeutral' ;
}
I hope this helps.
Thanks,
Ganesh
Visual BI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Premdas,
target_val is a measure? what is the data type of target_val (int, float, ...)?
Design studio can't convert null to int. Could you please check if there is some error messages (when you run the application)?
Regards,
Giulia
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Premdas,
did you check how "null" values are being treated in the BEx query ? is the BEx query configured to show "null" as an actual "0" ?
regards
Ingo Hilgefort, Visual BI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.