I'm using crossfilter and dc to render charts of subject-related observations.
Each observation gets treated as a dimension. However, not all rows will have values for all dimensions as some dimensions have data that is repeated over time. For example, Column A
has four values over four rows, but Column B
has only one value so the other three rows it will be 0
/ ""
/ blank
.
Now if I filter on Column B
for rows with a certain range / value, then automatically I lose all other rows for Column A
and if I wanted to filter on Column A
AFTER filter on Column B
then I'm only filtering out of the one common row that has values for both.
This may sound as a logical behaviour, but it's not true to the data, because if I wanted to filter subjects (i.e.) rows that have a certain range for Column A
AND a certain range for Column B
that results in a wrong result, because of the blank values which are not missing they are just there because it's a table and all columns are expected to have values for all rows.
Is there a way to be able to filter on Column B
without that excluding values from Column B
only because they're blank?
I'm sorry that took that much text to explain!
UPDATE
An example: observation data is collected for patients, let's say 'weight' and 'blood pressure'. For one subject there might be two weight readings, but four blood pressure readings. When I try to create the data structure for crossfilter, I create two columns one for weight and another for blood pressure. I want to display to the user two bar charts showing the distrubtion of values in each pbservation across all subjects. The user should be able to filter subjects with a weight range AND a blood pressure range. Because two of the rows for a subject will not have values for blood pressure, filtering on weight will filter out subjects(i.e. rows) that might be in the range for the blood pressure filter, but did not have a value for weight so they were wrongly excluded