data visualization to the end user figure data filtered on medicine name grazax sq- and sorted by day should end up with the same number for every medicine or observation per day in var countpermed mednamedim group(reducecount()variablesintable ["key","value"filteredtable empty(append(createtable(countpermed top(infinity)variablesintable,'reduced table'))crossfilter comes with two mapreduce functionsreducecount(and reducesum(if you want to do anything apart from counting and summingyou need to write reduce functions for it the countpermed variable now contains the data grouped by the medicine dimension and line count for each medicine in the form of key and value to create the table you need to address the variable key instead of medname and value for the count (figure figure mapreduced table with the medicine as the group and count of data lines as the value by specifying top(infinityyou ask to show all medicines onscreenbut for the sake of saving paper figure shows only the first five results okayyou can rest easythe data contains lines per medicine notice how crossfilter ignored the filter on "grazaxif dimension is used for groupingthe filter doesn' apply to it only filters on other dimensions can narrow down the results