Good morning,
I am trying to display in Dahboard via an indicator widget the sum of the Length shape of a layer by filtering such that the frequency is different from 0.
With the help of the community here is the expression:
var filter = Filter($layer, 'FREQ_MAINTENANCE <> 0');
var Sum = Sum(filter, 'Shape__Length');
return Sum;
However Dashboard with the advanced format, I'm forced to use $datapoint and I don't really see how to get out of it.
Which formula to put before the return
return {
//textColor:'',
//backgroundColor:'',
//topText: '',
//topTextColor: '',
//topTextOutlineColor: '',
//topTextMaxSize: 'medium',
middleText: $datapoint.sum_Shape__Length,
middleTextColor: '',
middleTextOutlineColor: '',
middleTextMaxSize: 'large',
//bottomText: '',
//bottomTextColor: '',
//bottomTextOutlineColor: '',
//bottomTextMaxSize: 'medium',
//iconName:'',
//iconAlign:'left',
//iconColor:'',
//iconOutlineColor:'',
//noValue:false,
//attributes: {
// attribute1: '',
// attribute2: ''
// }
}
After several reading of document, I did not succeed.
Also what is the difference between: $datapoint.field AND $datapoint.["field"]
Thanks for your help