I want to remove/hide records that have Null or 0 in a table. I'd like the Gap Percent column to start with the Gap Percent record that has 5. @KenBuja I saw a thread on doing this in pop-ups that I tried to follow but having some issues getting it to work in a table.
I tried something like this, and it removes the Null values but not the 0 values as well:
var gap = IIf(IsEmpty($datapoint.gap_percent), "0", $datapoint.gap_percent)
return {
cells: {
target_value_final: {
displayText : $datapoint.target_value_final,
textColor: '',
backgroundColor: '',
textAlign: 'right',
iconName: '',
iconAlign: '',
iconColor: '',
iconOutlineColor: ''
},
gap_percent: {
displayText : gap,
textColor: '',
backgroundColor: '',
textAlign: 'right',
iconName: '',
iconAlign: '',
iconColor: '',
iconOutlineColor: ''
}
}
}
Solved! Go to Solution.
IsEmpty returns true if a field either has a null value or an empty string (''). You'll have to check separately for the 0 value, since that is not null.
var gap = IIf(IsEmpty($datapoint.gap_percent) || $datapoint.gap_percent == 0, "0", $datapoint.gap_percent)
IsEmpty returns true if a field either has a null value or an empty string (''). You'll have to check separately for the 0 value, since that is not null.
var gap = IIf(IsEmpty($datapoint.gap_percent) || $datapoint.gap_percent == 0, "0", $datapoint.gap_percent)
@KenBuja thank you!!!