cancel
Showing results for 
Search instead for 
Did you mean: 

COUNT DISTINCT in Graphical Calc Views

0 Kudos

Hi,

Counters (distinct counts of e.g. customers, materials etc.) seem possible in a graphical calc view only at the final output node level but not at any intermediate point in the graphical calc view. This requires having to retain cutomer and material until the final output stage. This is not particularly efficient if all you need is $ sales, # of customers and # of materials  by division.

Script-based calc view's CE_AGGREGATION function supports count but not count disttinct. So is the option only using pure SQL in a script-based calc view for count distinct of granular attributes with a group by of high-level attributes?

Accepted Solutions (0)

Answers (1)

Answers (1)

rama_shankar3
Active Contributor
0 Kudos

Kraft BI team:

An alternate solution would be to model your data to have a static counter value '1' by customer and sum up in the aggregation.

Hope this helps.

Regards,

Rama

0 Kudos

Hi,

How does having a static counter = 1 help with COUNT DISTINCT? If customer and material appear multiple times (as they do in transactional tables), counter would just add up. The challenge is whether count distinct is possible prior to the final node of a calc view.