Get Free Trial

Distinct count is incorrect and grid is broken when using a field of type year/quarter/month/day

Projet TCD asked on January 10, 2019
  • Version: Pivot Table for JSON data sources 2.6.11 (Jan 02, 2019)
  • Browser: Chrome 71.0.3578.98 on MacOS 10.14.1
  • Link to reproduce
  • Steps to reproduce:
    • Display pivot table
    • Right-click on cell (1:1) or (1:2) and choose Aggregation > Distinct Count in the context menu
      • Or open Fields configurator and change in “Values” from “Count of Group” to “Distinct Count of Group
  • Observed behavior:
    • Result is incorrectly displayed (no result, or incorrect value)
    • Grid is now misaligned and cannot be manipulated (selection, resizing of columns, etc)
    • Error in Chrome JS console:
      • flexmonster.js:9 Uncaught TypeError: Cannot read property '0' of undefined
        at x9J.B4f.GU (flexmonster.js:9)
        at x9J.ab (flexmonster.js:9)
        at N2y.ab (flexmonster.js:9)
        at X1a.ZD (flexmonster.js:9)
        at X1a.getData (flexmonster.js:9)
        at j5k.K1a.getDataFunction (flexmonster.js:9)
        at j5k.getData (flexmonster.js:9)
        at N8E.T1E.xd (flexmonster.js:9)
        at e4E.Bh (flexmonster.js:9)
        at e4E.m6k.Rk (flexmonster.js:9)
  • Expected behavior:
    • Pivot produces the expected result for distinct count when one or more fields have a type “year/quarter/month/day”, independently of their order in the data/configuration.
  • Workarounds:
    • Changing “type” in the JSON data headers from “year/quarter/month/day” to “date” solves the issue (value and no error in console) – Not acceptable since the point is to use the type “year/quarter/month/day”
    • Moving the field of type “year/quarter/month/day” to the last position in the JSON data headers (and changing the order for the data) also solves the issue (value and no error in console) – Not acceptable when data and headers are created dynamically (no control on the order of the fields)


3 answers

Tanya Gryshko Tanya Gryshko Flexmonster January 11, 2019

Thank you for reporting the issue.
Our development team will release an update with the fix for this issue on January the 14th.
Please let us know in case of other questions.

Tanya Gryshko Tanya Gryshko Flexmonster January 16, 2019

We are glad to inform you that the new version is released. The issue with "year/quarter/month/day" data type was fixed.
You are welcome to update the component.

Projet TCD January 18, 2019

The issue has been tested and seems to be resolved with version 2.6.12.
Thank you!

Please login or Register to Submit Answer