Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
lukeSDM
Helper V
Helper V

issue with slicer relationships

@AllisonKennedy 

when changing a slicer my matrix numbers are not changing.

I have attached my relationship model where all datasets are linked via the adno number but it is not changing.

My duplicated table is not connecting with the original it seems.

I have also attached a simple picture to show whats not connecting.the blue arrow is shows the part not connecting even though all the red bits do, its worth noting that the items between the blue arrow are the original and duplicate datesetsthe blue arrow is shows the part not connecting even though all the red bits do, its worth noting that the items between the blue arrow are the original and duplicate datesetsrelationship.PNG

 

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

@lukeSDM Ok, here we go. 

 

First a couple quick questions:

1) What table is the Qualification slicer using?

2) What visualizations does the Qualification slicer need to filter?

 

Thinking of the answers to those questions, what you need to develop is a star schema model with Fact and Dimension tables.

 

Right now you have LOTS of Fact tables and from what I can see 1 dimension table - Pupil_Data. I can see that easily at a glance because Pupil_Data has lots of '1's while all the other tables have the '*'s meaning the Pupil_Data table contains each Adno 1 time, no duplicate values of Adno in that table. This is the perfect table for using in slicers and columns, categories, etc. 

 

@lukeSDM  UPDATE: I should note here that Fact tables generally do not link to each other as you can see with the arrows on the links. Even though there is a line from Predict Autumn to Pupil_Data to the duplicate Predict Autumn, the arrows both point to Pupil_Data, which means when you start at Predict Autumn 1, you can filter Pupil_Data, but then you get stuck - you can't swim upstream against that arrow to get to the duplicate Predicut Autumn table and therefore any slicers made using Predict Autumn 1 will not affect Predict Autumn 2.

 

Now that you want to filter by Qualification, we need a dimension table for Qualification that relates to any other table it needs to filter. This table should have each qualification exactly once, and can have any other info you might want about qualifications, but might simply look like:

Qualification
Art
Maths
Food
Physics

 

etc, listing all Qualifications.

 

Then, relate the newly created Qualifications  dimension table to both Predict Autumn1 tables using Qualification columns (and also relate this table to any other of the Fact tables it needs to be able to filter if they exist). 

 

Side notes for consideration (these won't solve anything, but are helpful to know):

The dotted lines are not being used in your visualizations unless you have written a DAX expression to use them.

The EAP, ethnicity, DOB seem to be present in many tables. Assuming this information stays constant for each Adno, you could save space and therefore speed by only loading it into the Pupil_Data table and keeping it out of the progress and attendance tables.

 

Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 

 

If you found this post helpful, please give Kudos.

I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 

https://sites.google.com/site/allisonkennedycv


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

hi  @lukeSDM 

For your case, you need to set cross filter direction to "Both" for the relationship that between table which the field "Qualification" resides in and 'Pupil_Data' table.

https://docs.microsoft.com/en-us/power-bi/desktop-create-and-manage-relationships#cross-filter-direc...

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-lili6-msft  From the link you sent: 

However, if you have two or more tables that also have lookup tables (with some in common) then you wouldn't want to use the Both setting. 

Because these two tables are both fact tables, I would caution against using a both setting for cross filter direction as it may have some unintended consequences and prefer to get the proper star-schema relationship setup, but I'd love to hear your thoughts and if you have arguments for using both in this scenario. 


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

AllisonKennedy
Super User
Super User

@lukeSDM Ok, here we go. 

 

First a couple quick questions:

1) What table is the Qualification slicer using?

2) What visualizations does the Qualification slicer need to filter?

 

Thinking of the answers to those questions, what you need to develop is a star schema model with Fact and Dimension tables.

 

Right now you have LOTS of Fact tables and from what I can see 1 dimension table - Pupil_Data. I can see that easily at a glance because Pupil_Data has lots of '1's while all the other tables have the '*'s meaning the Pupil_Data table contains each Adno 1 time, no duplicate values of Adno in that table. This is the perfect table for using in slicers and columns, categories, etc. 

 

@lukeSDM  UPDATE: I should note here that Fact tables generally do not link to each other as you can see with the arrows on the links. Even though there is a line from Predict Autumn to Pupil_Data to the duplicate Predict Autumn, the arrows both point to Pupil_Data, which means when you start at Predict Autumn 1, you can filter Pupil_Data, but then you get stuck - you can't swim upstream against that arrow to get to the duplicate Predicut Autumn table and therefore any slicers made using Predict Autumn 1 will not affect Predict Autumn 2.

 

Now that you want to filter by Qualification, we need a dimension table for Qualification that relates to any other table it needs to filter. This table should have each qualification exactly once, and can have any other info you might want about qualifications, but might simply look like:

Qualification
Art
Maths
Food
Physics

 

etc, listing all Qualifications.

 

Then, relate the newly created Qualifications  dimension table to both Predict Autumn1 tables using Qualification columns (and also relate this table to any other of the Fact tables it needs to be able to filter if they exist). 

 

Side notes for consideration (these won't solve anything, but are helpful to know):

The dotted lines are not being used in your visualizations unless you have written a DAX expression to use them.

The EAP, ethnicity, DOB seem to be present in many tables. Assuming this information stays constant for each Adno, you could save space and therefore speed by only loading it into the Pupil_Data table and keeping it out of the progress and attendance tables.

 

Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 

 

If you found this post helpful, please give Kudos.

I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 

https://sites.google.com/site/allisonkennedycv


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Spoiler
 

This solved the issue straight away!

Thank you for the helpful tips!

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.