Forum Discussion

CarlZ22's avatar
CarlZ22
Regular Visitor
4 years ago
Solved

count distinct and data integrity

hello,

I have a data set with service records and they are ranked by low med high at each visit. tech will go visit the same device (fridge) multiple times a year under the same case number and device ID (unique) but rank differs at each visit. I want to calculated the working cases and managed to do that by filtering open cases and taking the distinct of the count but i also want to show how many are in low med high but the numbers dont add up. (logically it shouldnt but am i thinking incorrectly)

 

case device rank tech

1       xxx     high  ax

2       yyy     med  vv

1      xxx      med  ax

2      yyy      med  vv

2      yyy      low   vv

 

viz:

tech  uniq count of open cases   low     med      high

ax                 1                                0         1        1

vv                 3                                1         2        0

 

so technically 1 open case cant have 2 status (med and high)

1 Reply