J
Johanna Gronlund
Hello,
I have a table in the following format:
ID Diagnosis Fraction
1 X48 0.01
1 Y52 0.5
2 U78 0.85
etc
What I need is only those records that have the highest fraction for each ID.
ID Diagnosis Fraction
1 Y52 0.5
2 U78 0.85
etc
I have used the Max function in my query. However, that does not work
because the information is also grouped by diagnosis as well as ID and this
causes all of the lines to appear. Does anyone know how to get around this
problem? I can't just bring through Fraction and ID because there is no way
of linking the fraction to diagnosis afterwards. Many diagnosis have the same
fractions.
Many thanks for your help in advance.
Johanna
I have a table in the following format:
ID Diagnosis Fraction
1 X48 0.01
1 Y52 0.5
2 U78 0.85
etc
What I need is only those records that have the highest fraction for each ID.
ID Diagnosis Fraction
1 Y52 0.5
2 U78 0.85
etc
I have used the Max function in my query. However, that does not work
because the information is also grouped by diagnosis as well as ID and this
causes all of the lines to appear. Does anyone know how to get around this
problem? I can't just bring through Fraction and ID because there is no way
of linking the fraction to diagnosis afterwards. Many diagnosis have the same
fractions.
Many thanks for your help in advance.
Johanna