This is a migrated thread and some comments may be shown as answers.

Dynamic filter on chart in report

1 Answer 94 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Scott Buchanan
Top achievements
Rank 1
Scott Buchanan asked on 12 Jan 2016, 07:25 PM

I have a bubble chart on a report.  The data source lists physicians, issues and counts.  The size of the bubble is based on the Sum(IssuesFound).

Our client base is split between those with only a few issues and those with quite a few.

I am attempting to place a dynamic filter on the chart, so that a points are plotted when there are less than 8 but limit to points with larger bubbles when there are more than 8 bubbles.  At Series > lineSeries2 > SeriesGroup > Filters I entered:

Expression: = Sum(Fields.IssuesFound)
Operator: >=
Value: = IIf(CountDistinct(Fields.AuditIssueId) >= 8, 5, 0)

However, the results are that it always shows all items on the chart (the false result of the IIF).
I've added text boxes in the report header to show me the values of Sum(Fields.IssuesFound) and CountDistinct(Fields.AuditIssueId) and they are correct.
I suppose that the IIf is not evaluating properly during the chart rendering.

If I hard code the Values, like =5, the filter works great and only those issues with a count of 5 or more are plotted.
Is it possible to make this dynamic?

Best,
Scott

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 15 Jan 2016, 03:36 PM
Hello Scott,

Since the filter works when you hard code the value, it seems that the expression:

= IIf(CountDistinct(Fields.AuditIssueId) >= 8, 5, 0)

does not return the expected result.

Note that the aggregate functions used in the filter expressions will be evaluated against the current data scope. The current data scope, in this case, is the data from the current series group.
Please find attached a sample report which filters the series as expected.
If you need further help, please open a support ticket where you can attach a sample report demonstrating your particular scenario, so we can investigate it.

Regards,
Nasko
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Scott Buchanan
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or