Skip to main content
Question

Cumulative Distribution Curve - RUNNING_SUM (COUNT(DISTINCT...) - Line Chart Issue

  • August 7, 2026
  • 0 replies
  • 13 views

ben.hensl
Level 3
Forum|alt.badge.img

Hi all,

I'm trying to build a cumulative distribution curve in Studio using a line chart.

Along the X Axis I have a KPI which gives me 1, 2, 3 , 4, days and so on. On the Y Axis I’m trying to show a cumulative count of items which took the amount of days shown on the X Axis to do something.

I have the error in the line chart that there is undefined behaviour, no ORDER BY specified, because in the Line Chart I cannot sort by the KPI used for the X Axis.

When incorporating ORDER BY as follows:

    RUNNING_SUM( KPI("this is a count(distinct….) kpi"),

    ORDER BY (KPI("nr. of days") ASC))

I am told that I cannot use the count aggregation function together with a dimension function input.

Has anyone faced something similar and found a solution? When I put the two data points into a table and sort the table by the Nr of days it works pefectly but the same sorting functionality is not taken over when I switch that sorted and functioning table to a line chart.

Any ideas? Your feedback would be very much appreciated.

Thanks, and have a great weekend!

Ben