But these two aggr function are not the same.
count(aggr(memb_id,memb_id, service_date_id, service_type))
groups the records by the three dims and then provides a count of the groups (that's what I am looking for).
counts number of rows in each group and then gives me the sum of those counts, it essentially gives me the total number of rows in the data set which could be calculated simply by count(memb_id) as you can see in the attached qvw file.
x.qvw 149.5 K
Thanks Rob for your help. Yes, this alternative expression runs much faster. My app does not freeze and it actually completes the calculation now which is a step in the right direction. However, depending on how much data is sliced by the user from the dim filters, it could take up to a minute or longer to complete.
Do you, or any one else on this forum has other ideas I could build on this?
to reiterate again what the chart is suppose to do:
it is suppose to count and return number of groups in the data set expressed by the following expression:
Count(DISTINCT memb_id & service_date_id & service_type)
Try like this in script
autonumberhash256( memb_id & '_' & service_date_id & '_' & service_type) AS Key
(qvd) where service_type = '97001';
1 AS KeyCount
Now you can use Sum(KeyCount) as expression in your charts to calculate the key count.
Hope this helps you.