Select to view content in your preferred language

Indicator - show 0 AND icon instead of "no data" when no records match filter

570
1
07-20-2023 12:19 PM
LS-SD
by
New Contributor II

I have an dashboard indicator that displays sum of a field (bctotal). When there are no records, it shows "no data." I would like it to show 0 (zero) AND the icon. If I change the label to 0 for no data, the icon is not present. I tried using advanced formatting to check for null and return 0, but that didn't work. Help? 

return {
textColor: '#ffffff',
backgroundColor: '#38a800',
middleText: Iif(IsEmpty($datapoint["sum_bctotal"]), 0, $datapoint["sum_bctotal"]),
middleTextColor: '',
middleTextOutlineColor: '',
middleTextMaxSize: 'large',
bottomText: 'CONTAINERS',
bottomTextColor: '',
bottomTextOutlineColor: '',
bottomTextMaxSize: 'small',
iconName: 'icon1',
iconAlign: 'left',
iconColor: '',
iconOutlineColor: ''
}

Indicator currently shows 

LSSD_0-1689880620599.png

but would like it to look like this, except 0 instead of 58

LSSD_1-1689880672887.png

 

1 Reply
AshliPrejean
New Contributor II

We would like this option as well. We have multiple indicators that use different statistics. One is SUM and the other is COUNT. The count indicator shows a zero value and the icon if the date filter has no records for that date. I assume this is because it always has something to count regardless of value, but shouldn't the date selector be filtering it and if there is nothing matching today's date, the "No data" text should be all that appears? Even selecting "Render when filtered", it still shows the zero count and icon.

On the other hand, the sum indicators (also tested with the other stat options) show the "No data" text (or our no data customized text) both when there is no data for that date selected AND when we select "Render when filtered". The only difference is the statistic type. 

I'm sure getting into the Advanced Formatting this could be worked around, but with so many options, its strange that this is the behavior.

For a public facing dashboard the inconsistency may be confusing.

0 Kudos