Pivotgridv2 measure is not slicing the data by the second attribute when expanding

1 Answer 11 Views
Data Source PivotGridV2
mark
Top achievements
Rank 1
mark asked on 13 May 2025, 01:36 AM

When there is a second item in a row and both are expanded the value is no longer sliced(filtered?) by the first item. My users are used to this with excel etc and really want this functionality how can I achieve it?

Value sum is correct (sliced) for all rows

where second row is expanded and not correct(sliced?).

 

Here is a simplified version of my code showing the unwanted behavior

<!DOCTYPE html>
<html lang="en">
<head>
  <link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
  <link href="../../styles/default-ocean-blue.css" rel="stylesheet">
  <script src="https://code.jquery.com/jquery-3.7.0.min.js"></script>
  <script src="https://unpkg.com/jszip/dist/jszip.min.js"></script>
  <script src="../../js/kendo.all.min.js"></script>
  <script src="../content/shared/js/console.js"></script>
</head>
<body>
  <div id="container">
    <div id="pivotgrid"></div>
    <div id="configurator"></div>
    <div id="pivotbutton"></div>
  </div>
  <script>
    var dataSource = new kendo.data.PivotDataSourceV2({
      "data": [
        { "Value": 77, "ASort": 2, "BSort": "b" },
        { "Value": 28, "ASort": 1, "BSort": "a" },
        { "Value": 63, "ASort": 2, "BSort": "a" },
        { "Value": 42, "ASort": 1, "BSort": "b" }
      ],
      rows: [
        { name: "ASort", expand: true },
        { name: "BSort", expand: true }
      ],
      "schema": {
        "model": {
          "fields": {
            "Value": { "type": "number" },
            "ASort": { "type": "number" },
            "BSort": { "type": "string" }
          }
        },
        "cube": {
          "dimensions": {
            "ASort": { "caption": "ASort" },
            "BSort": { "caption": "BSort" }
          },
          "measures": {
            "Value sum": {
              "field": "Value",
              "format": "{0:n}",
              "aggregate": "sum"
            }
          }
        }
      }
    });


    $(document).ready(function () {
      window.pivotgrid = $("#pivotgrid").kendoPivotGridV2({
        height: $(window).height() - 2,
        dataSource: dataSource

      }).data("kendoPivotGridV2");

      $("#configurator").kendoPivotConfiguratorV2({
        dataSource: pivotgrid.dataSource,
        filterable: true,
        sortable: true
      });

      $("#pivotbutton").kendoPivotConfiguratorButton({
        configurator: "configurator"
      });

      $("#container").kendoPivotContainer({
        configuratorPosition: "left"
      });
    });
  </script>

</body>
</html>


mark
Top achievements
Rank 1
commented on 14 May 2025, 03:59 AM

Pivotgrid (version 1) does not have this issue and keeps the subtotal line intact when expanded

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 15 May 2025, 11:17 AM

Hello Mark,

I have already answered the private support thread about this, but I will reply here as well. 

This is a bug and has been logged for fixing:

Regards,
Nikolay
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Data Source PivotGridV2
Asked by
mark
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or