Customer Portal

Conditional Count in Aggregate

Comments 3

  • Avatar
    admin
    0
    Comment actions Permalink
    Hi visasquare,

    what about put ExtFilter before Aggregate which will filter out unwanted records?
  • Avatar
    visasquare
    0
    Comment actions Permalink
    Thank you for the response. That is what I did, put a ext filter

    But I want both the counts? Hence i need to write two aggregators reading data from two ports of ext filter and then merging them together using a merge

    This looks like a lot of work and redundant code for a simple SQL :(

    Just wondering if there is some efficient way of doing this.
  • Avatar
    admin
    0
    Comment actions Permalink
    Ah, sorry I missed "not" statement :-) Then you could prepend Reformat component, which will transform record e.g. [id, case_status] to [id, case_status_a, case_status_b] based on condition in CTL2 code. One field per record will be filled by actual value, second by something harmless (0 for SUM for example). Then you use 2 aggregation functions in Aggregate.

Please sign in to leave a comment.