0

Pivottable custom calculator

asked 2017-08-01 07:00:09 +0800

mdxdev gravatar image mdxdev
100

updated 2017-08-07 02:55:25 +0800

cor3000 gravatar image cor3000
6280 2 7

I am trying to use the distinct count calculator which is found here (https://www.zkoss.org/wiki/ZKPivottableEssentials/Customization/Custom_Calculator)

It seems to total the distinct entries at the bottom total line, however I would also like a distinct count on each row. I can't attach an image, but the link is below (remove space before //):

(https://p3.mdxperience.com/pub/example.png)

The way it's currently working is that it counts the number of distinct accounts in the list, but I would like to count the number of distinct accounts for each CPT field, then just sum the total as normal.

Is it possible to do this?

Thanks

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-08-07 12:01:45 +0800

cor3000 gravatar image cor3000
6280 2 7

As of the current API you can't mix aggregation functions like that. The merge() function doesn't provide any parameters to know which level you are on so you cannot distinguish. Also as the nature of a pivottable you can change the column/row field nesting dynamically so that such aggregation function would not be reusable if it depended on specific field names.

Robert

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2017-08-01 07:00:09 +0800

Seen: 12 times

Last updated: Aug 07 '17

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More