Dynamic filter on chart in report

2 posts, 0 answers
  1. Scott Buchanan
    Scott Buchanan avatar
    40 posts
    Member since:
    Dec 2008

    Posted 12 Jan 2016 Link to this post

    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?


  2. Nasko
    Nasko avatar
    944 posts

    Posted 15 Jan 2016 Link to this post

    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.

    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
Back to Top