Skip to main content
Question

Histogram grouped not on case

  • August 6, 2019
  • 2 replies
  • 5 views

joos.buijs
Level 10
Forum|alt.badge.img+2

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 its 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?

2 replies

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)


joos.buijs
Level 10
Forum|alt.badge.img+2
  • Author
  • Level 10
  • August 7, 2019

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.

Were remodeling the data structure anyway and this will solve the issue.