Histogram grouped not on case

Hi all,

We would like to show a histogram, where the dimension is not calculated per case but per customer.
Concretely, we would like to know how many customers have 1 case running, how many 2-4, 4-6, etc.

The regular histogram would be great because of it’s auto-binning feature. However, it automatically assumes that the dimension is calculated per case.

Any ideas how we can use the histogram component, or mimic this behavior in a bar chart?

Hi,

You can do this use a histogram if you use a little-known feature of PULL functions: instead of using normal tables you can make domain table out of individual columns. I had attached documentation that explains how to use this feature.

For your concrete question, you can use a histogram with the dimension:

PU_COUNT( DOMAIN_TABLE(“TABLE”.“CUSTOMER”), “ACTIVITY TABLE”.“CASE KEY”)

The PULL function counts the case keys for associated with each customer, and the histogram then groups them into boxes.

Kind Regards,

Calandra

PQL documentation to DOMAIN TABLE.pdf (11.1 KB)

Hi @c.eckert, thanks for your reply!

Currently this does not work, as our parent-child table relationship is reversed, due to some attributes missing in the case table.
We’re remodeling the data structure anyway and this will solve the issue.