Forum Discussion
Database design for comparing rows
Hello friends,
I face a challenge and I don't know how to address it. I have a big flat table with the test results. It contains data on all completed exams (different types) and candidates who took them. One of the things I have to do, for example, is to check if the candidates who took "Exam A" got better results on "Exam B."
I have no idea where to start. I have made several boards and did several edx courses. I even read a book π but I have no idea how to appease this. I was hoping someone could point me in the right direction. Which book should I read/what video to watch, etc. I'm willing to work for it π
Thnx!
Hi Benjamin_Eureka,
Is the output in your data your expected output? But as parry2k said, the data you provided lack candidate column. Would you please check for it?
If you want to filter out candidate that pass both Exam A and Exam B, please refer to the measure below:
Measure = VAR A = CALCULATE ( MAX ( 'Table'[result] ), ALLEXCEPT ( 'Table', 'Table'[candidate] ), 'Table'[exam] = "ExamA" ) VAR B = CALCULATE ( MAX ( 'Table'[result] ), ALLEXCEPT ( 'Table', 'Table'[candidate] ), 'Table'[exam] = "ExamB" ) RETURN IF ( A = "Yes" && B = "Yes", 1, 0 )If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
13 Replies
- parry2kSuper User
Benjamin_Eureka hey could you please post the sample data and expected output. Make sure post it is in a table format, or share excel file, you can share excel using one drive/google drive.
- Benjamin_EurekaFrequent Visitor
Thank you for your quick reply. Here is a link with some sample data. The exam types are in Dutch, but you'll get the point.
- parry2kSuper User
Benjamin_Eureka Thanks but no idea how you get to those numbers? Could you explain the logic?