Display 'DISTINCT' Count in Infographic

969
1
05-02-2019 09:59 AM
JackCibor
Occasional Contributor II

I have an app where I have several infographic widgets displaying various counts. The infographics work off of Extra Data Sources that are built off of a map layer. This is done so that the map and all counters adjust to filtering via the filter widget, and so the infographics display counts for the entire data set and not for current extent. I would like one of those counters set up to display a count of just distinct values. In standard development I would add a DISTINCT function to my Select statement. Does anyone know of a way to do this with a fairly low level of effort? Is the only option to customize the widget or is there a way to hack this in the configuration files? There does not seem to be any out of the box support for this. 

0 Kudos
1 Reply
JackCibor
Occasional Contributor II

I guess the infographic widget has nothing to do with it. It just displays the stat it gets from the extra data source, and the extra data source is populated by execution of a query task which contains a query as one of its parameters. And one of the properties of a query is returnDistinctValues. So I would need to find a way of getting WAB to feed that property and set it to True but only for this one data source when formatting the query for the query task. And maybe just return the count instead of all of the data values by also setting returnCountOnly. 

0 Kudos