Hi!
I have an issue connected to my dashboard and its widgets. I am currently using enterprise 11.3. In short, my dashboard uses a category selector and an indicator. The widgets have different data, but are connected through similar fields.
My indicator uses a datapoint and a redference value. Both use the same data source, however they are filtered in different ways. My first value (datapoint) shows land (m2) that our municipal landlort taker care of. The seconf value shows land that the residents themselves takes care of. The third value is a grouping of the other to. In short:
Datapoint = Area m2
Reference value = other areas m2
Own value = Area + other areas m2
So, to the issue. I have certain areas where the reference value is non existent, i.e. areas where no land is to be taken care of by the residents. This makes the arcade script fail behind the scenes. The indicator returns no data even when an area containt datapoint but not reference value.I would like the reference value to be treated as 0 so that i always get a result.
Down below is a basic interpretation of my script:
var allmannaytor = $datapoint["sum_SHAPE.STArea()"]
var hyresgastskottaytor = $reference["sum_SHAPE.STArea()"]
var total = allmannaytor + hyresgastskottaytor
return {
//textColor:'',
//backgroundColor:'',
topText: 'Allmänna ytor: ' + Text(Round(allmannaytor, 0), "#,###") + ' m²',
topTextColor: '',
topTextOutlineColor: '',
topTextMaxSize: 'medium',
middleText: 'Hyresgästskötta ytor: ' + Text(Round(hyresgastskottaytor, 0), "#,###") + ' m²',
middleTextColor: '',
middleTextOutlineColor: '',
middleTextMaxSize: 'medium',
bottomText: 'Totala ytor: ' + Text(Round(total, 0), "#,###") + ' m²',
bottomTextColor: '',
bottomTextOutlineColor: '',
bottomTextMaxSize: 'x-small',
//iconName:'',
//iconAlign:'left',
//iconColor:'',
//iconOutlineColor:'',
//noValue:false,
//attributes: {
// attribute1: '',
// attribute2: ''
// }
}
I have tried to adjust this script adding if-statements, isempty and so on. Nothing is working for me. I need something that tells the dashboard to check for reference value first. If the value is non existing (not 0) it needs to be interpreted as 0. If a value exists this function can be ignored.
Any suggestions?