Forum Discussion
Filter with multiple relationship
- 7 years ago
Doublecheck the data type on GradeValue.Value and make sure that it's still INT.
If it's int take a look in the visualizations pane and make sure that "Sum" is selected on the settings for GradeValue.Value.
This is definitly an issue with dataformatting of some sort. Power BI defaults to aggregation when you have numeric columns so you should never have a scenario like the one you're describing!
Sorry, there is a foreign key from Student to University, missed it on my database diagram.
This is quite hard to resolve, from the information that you have provided there is actually no reason as to why your datamodel shoudnt work.
But in my opinion it sounds like it's the link between Grade and Gradevalue that is bad. Could you possibly take a look and make sure that the relationship there is working as intended?
- dd3217 years agoFrequent Visitor
There were some anomaly with my data for Grade and GradeValue, I will investigate and comment further if resolved or not! Thanks! tex628
- tex6287 years agoCommunity Champion
No worries! Let me know if it works out.
- dd3217 years agoFrequent Visitor
Hi tex628 ,
It works, actually GradeValue and Grade has a many-to-one relationship because in the GradeValue table, multiple rows is related to one row in Grade. When I fixed it then it works as expected. So in my report I have:
- Table 1 with multiple Student
- Table 2 with multiple University
- Table 3 with Grade.type, Grade.description and GradeValue.value
When I select one specific student, only its corresponding grade will show in table 3, which is what I want. However, when I don't select a university, or a student, table 3 shows all rows, and therefore there will be a lot of redundancy of type and description. Do you know how I can make it so that if nothing is selected, I want to only show the description and type but no value?
- This means if I select one university, I want to show the total grade and its corresponding type and description (works but redundant rows, multiple descriptions, type etc).
- If I select one student, I want to show grades associated with this specific student (works as expected).
- If I don't select anything, no values are shown except for grade type and description.
I suspect I have to do custom measures or DAX, as I am fairly new to PowerBI, if that's the case could you refer me to websites where I can learn that?
Thanks!