How to configured "other" in charts

Hi,

I’m trying to accomplish following requirement:

  • In a chart I have to count cases by a special information called “priority”, I have 11 differents priorities but the chart only have to show 5 of the them in 5 different columns dinamically, and the rest of the count cases with differents priorities must be displayed in a sigle column called “other”.

I’m using a Report Definition to filter only the 5 priorities that I need. What should I do to put all other priorities into “other” column in the chart?.

Thank you.

One way to do this would be to implement a SQL function alias (e.g., “Other”) that would return false/zero for the 5 specific priorities you are pulling out, and true/one for all others. You could then add a column to your report with a count of “Other” cases.

I have not working with SQL functions in Pega but I made this function:

(CASE
WHEN {1} IS NOT NULL
THEN CASE
WHEN {1} == “URGENT” OR {1} == “STAT” OR {1} == “RPH REVIEW” THEN false
ELSE true
END
END)

It could work for my requirement?, I attached what I put in Reference tab.

Yes, that is along the lines of what I had in mind. Be aware that what you are implementing here is a fragment of a SQL query, so:

  1. Your equality operator will be ‘=’ rather than ‘==’

  2. You will use single quotes rather than double quotes to delimit string values

also, since you are returning tue/false your return type should be boolean.

A lot of thanks Ron, I already applied your comments and I got this results but unfortunately doesn’t look like what I need.

Please post a screen shot of the Query tab of your report definition. If you are using “Count” as the Summarize function, you may want to return null from the “Other” FA for the specific priorities.

Thank you so much, Ron. I finally could resolved it. I attached what I made for accomplish requirement. Again, thank you for your help.