March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi
I'm learning a lot from reading these forums, so thank you to everyone who posts here. I was wondering if I could tap into the collective wisdom and ask for some advice/guidance handling the following problem.
I work for a group of schools in the UK, we have a number of pupils on roll each of whom have a series of test results collected throughout the year.
To represent all of this we have four tables:
All of the fact tables are currently linked to the dimension table on a student_id key which is unique to the student. The group memberships fact table and the demographics fact table are both linked to the student dimension table with a bi-directional filter relationship, whereas the test results table is a single direction link. There are no compound keys such as student_id & year group/grade in the model at the moment.
The third fact table might seem odd, but we need to be able to present information about all the different demographics in one table visual and this was the only way we could think of to get a table visual to play nicely.
Where we're really looking for guidance is on the group memberships and test results fact tables. We need to be able to display the following sorts of things:
We've come up a with a few ideas for how to do this, including measures that filter the group memberships table on a date, then using select value to get the year group/grade name from the group memberships table and using it to filter the test results table. We've also tried making a year group/grade offset column in both the group membership which we merged into the test results table so filtering on an offset of 0 would give us the most recent year group/grade a student is in along with the test results associated with that year group/grade.
What we'd really like to know is if either of these would be considered best practice and some alternative perhaps more efficient ways of doing it. We can work in both DAX and PowerQuery.
Any advice is gratefully received!
Solved! Go to Solution.
Hi @elJukes
So far, i can work out your requirement 1 and 2
1.create a new table without relationship with other tables
yeargroup = VALUES('group'[YearGroup])
2. create measures in the group memberships fact table
condition1 = IF(SELECTEDVALUE(yeargroup[YearGroup])=MAX('group'[YearGroup]),1,0) condition2 = IF(SELECTEDVALUE(yeargroup[YearGroup])=MAX('group'[YearGroup])+1,1,0)
3.
Add [YearGroup] from the new created table "yeargroup" into a slicer,
Add [condition1] in the visual level filter of the table called "test results for that same year group/grade",
Add [condition2] in the visual level filter of the table called "test results for their previous year group/grade"
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @elJukes
So far, i can work out your requirement 1 and 2
1.create a new table without relationship with other tables
yeargroup = VALUES('group'[YearGroup])
2. create measures in the group memberships fact table
condition1 = IF(SELECTEDVALUE(yeargroup[YearGroup])=MAX('group'[YearGroup]),1,0) condition2 = IF(SELECTEDVALUE(yeargroup[YearGroup])=MAX('group'[YearGroup])+1,1,0)
3.
Add [YearGroup] from the new created table "yeargroup" into a slicer,
Add [condition1] in the visual level filter of the table called "test results for that same year group/grade",
Add [condition2] in the visual level filter of the table called "test results for their previous year group/grade"
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
86 | |
77 | |
57 | |
52 |
User | Count |
---|---|
201 | |
137 | |
108 | |
73 | |
68 |