Forum Discussion
rmwwgs
5 years agoFrequent Visitor
Union with conditions
Hi all, I am trying to merge 2 tables but am having trouble getting the outcome I want. I currently have a table showing students Attainment grades, based on subjects, and the report cycles that ...
amitchandak
Super User
5 years agormwwgs , My advice would be to create 4 dimension tables
student, Subject, grade name, grade
example
student = distinct(union(distinct(Table1[student]),distinct(Table2[student])))
or
student = distinct(union(all(Table1[student]),all(Table2[student])))
do it for other three too
join all these tables to the first two(1-M join) and analyze them together
Refer why you need star schema - https://www.sqlbi.com/articles/the-importance-of-star-schemas-in-power-bi/
- rmwwgs5 years agoFrequent Visitor
This looks like it should work, but when I try and put the results into a matrix, it throws out the wrong values for Grade, only showing the top result from the dimension table.