Forum Discussion
Benjamin_Eureka
6 years agoFrequent Visitor
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 t...
- 6 years ago
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
v-deddai1-msft
6 years agoCommunity Support
You need to add a comparison of two Exams' time to the if criteria, which is similar to my measure above
Benjamin_Eureka
6 years agoFrequent Visitor
Ah of course. Using variables is still new for me; sounds like a learning opportunity. I have enough to play around. Thanks a lot!