I try to write an Arcade expression in dashboard indicator, the expression has 4 if statements but only the first two statements are works the code is below:
############################################ var`enter code here`ar kmillion = 10000000; var million = 1000000; var k100 = 100000; var name_km = Left($datapoint["sum_VALUE"],2) var name_m = Left($datapoint["sum_VALUE"],1) var name_k100 = Left($datapoint["sum_VALUE"],3) var name_k99 = Left($datapoint["sum_VALUE"],2) if ($datapoint["sum_VALUE"] >= kmillion) { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_km, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } else if ($datapoint["sum_VALUE"] >= million < kmillion ) { return{ topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_m, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: '2مليون تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } } else { return { topText: 'اجمالي عدد التلاميذ', topTextColor: '#a80000', topTextOutlineColor: '', topTextMaxSize: 'small', middleText: name_k100, middleTextColor: '', middleTextOutlineColor: '', middleTextMaxSize: 'large', bottomText: 'ألف تلميذ', iconName:'icon1', iconAlign:'left', iconColor:'', iconOutlineColor:'' } }