I'm showing a guage with total number of records this way "return rbv_api.getCount(62898098);"
But I would like to show the count based on only some specific location which is based on LOCATION ID That means if my total records value based on "return rbv_api.getCount(62898098);" = 100 Records and my Guage must show based on locations ( A + B + Y + Z + X) = 15
Kindly let me know, if I have to write a nested conditions or the SQL
anyone to help in here please
Hi mysterymins, I'm sure someone will get back to you on Monday...
In one gauge? I think that's more a chart (or a very custom gauge with multiple dials in different colors).
However, if it's a set of gauges, one for each location, then a Query should more than capable to provide that with a different Query for each gauge.
Or if you want one gauge for the sum of locations (compared to the total), also a Query.
A Query to give you totals by location just needs a Group By add-on to Select Count(). But that's where a Chart makes more sense. It's designed to handle the type of display for multiple locations,
well i would want to have it one guage where it shows in single information
This guage would show the value which is single value - I would want a single sum of location
The correct syntax for getCount is rbv_api.getCount(viewId, filterName, filterValue)
try to use something like this:
return Number(rbv_api.getCount('your viewer id', 'location', 'A')) +
Number(rbv_api.getCount('your viewer id', 'location', 'B')) +
Number(rbv_api.getCount('your viewer id', 'location', 'X')) +
Number(rbv_api.getCount('your viewer id', 'location', 'Y')) +
Number(rbv_api.getCount('your viewer id', 'location', 'Z'));
Or you can use
rbv_api.selectQuery("SELECT count(*) FROM <your table> WHERE location IN ('A','B','C','X','Y','Z')", 1)
thanks a ton Ricardo... works like charm ...
Ricardo one simple question in here how do i link the view to show the same amount of data in drill down
Check the option “Hide count of total records for this view”.
Change viewer to run formula instead of using the 5 available filter fields.
this post as spam/abuse.
Thanks a ton Ricardo.... you are magician and it stunningly works..... just that the count is not working...