Widget apex charts - how filter tags by registers where exist data


I want to create an apex chart with some information. Nevertheless, there are registers without data (example in the image):

Currently, it just filters by concret values (example):

I would like to filter by tag “power_consumption”, but I would like to filter the registers where exist data (or filters by data which is different of empty).

For that reason, I was trying something like this in the “settings” of the dashboard, just in that widget:

"bucket": {

      (...MORE INFORMATION...)
		"tags": {
			"current": [],
			"power_consumption": [

Do you know if is a way in the tags filter by “where exist data” or “where does not exist data” ?

Thank you! :slight_smile:


I know that is not a good practice to have inconsistent datasets, I mean, datasets without some bucket values that left empty places as you show, it’s recommended by developers to avoid this because it may cause unwanted behavior, so I don’t think they develop filters for empty places.

Hope this helps

1 Like


tags should not be used like this.

switch_1, switch_2, switch_6… what happens if you need 100 switchs?

Just create one tag switch, with the switch_1, switch_2, etc., as values. Then you will be able to easily filter by any switch you need.

current and power_consumption should not be used as tags either. Think on bucket tags as primary keys on a database.

1 Like


Thank you @ega and @alvarolb!

About the switch, it is a device with 6 switches and it sends the payload with the state of them in that “photo”. We always will have 6 switches in that device. But it is a good idea that I plan to keep in my mind! :slight_smile: