Forum Discussion
Need help on cross filter implementation on multiple Table visuals based on multiple slicers
Hi Team,
I have one table called Student table, which is having "studentid","rank", "subject","attendancehours","event name" columns.
subject column have data fields "maths","science","overall".
here each student id have their rank diffrent in "maths","science","overall".
In power bi, i have 3 slicers those are event name ( slicer with all events), subject1 (filtered where subject=maths"), subject2(filtered where subject=Science")
i have used 3 table visuales to fetch the data like above format
i would like to achive below cross filter functionality :
when click on student id from table3, same id should pull ranks in table1 which have subject=overall
when click on student id from table2, same id should pull ranks in table1 which have subject=overall
for example one student ID 101 rank is in sceince is 10, maths is 15,overall rank is 5
in table 3 should display rank 10 for ID 101
in table 2 should display rank,15 for 101
by default all data should display in three visuals, when i go click on particular ids in tables then same id should filter and show rank based on overall in table
for example, when i go click on particular id in table 2 ( subject=maths)then same id should filter and show rank based on overall in table 1. when i click on id in table 3( subject=science) then same id should pull overall rank in table 1.
I have tried with interactions, writing dax measures for table 1
measure in table 1
OverallRank =
CALCULATE(
MAXX(
FILTER(
studenttable,
studenttable,[Subject] = "Overall"
),
studenttable[rank]
)
)
measure in table 2
SelectedID1 = SELECTEDVALUE(studenttable,[ID],filter(studenttable,[Subject]="Maths")
measure in table 3
SelectedID2 = SELECTEDVALUE(studenttable,[ID],filter(studenttable,[Subject]="Science")
Note: all of the data coming from only one table studenttable
its look like cross filter is not applied from table 3 to table 1 and table 2 to table 1. please suggest for this case, thanks for your help in advance.
Thanks
Mahesh
1 Reply
- AnonymousNot applicable
How you model your data in Power BI will make or break your ability to do this effectively. It sounds like you have lumped all of your data into a single table. What you need to do is create a 2nd table (do this in Power Query) that holds only the Student's details and ID and has 1 record per ID. Make a table relationship between this Student table and your data table.
Now in your table visuals, use the Student table to populate all of the columns (like ID) that are for the student. The remaining columns can come from your data table. You may not even need to write any measures. Now your cross filtering should just work, no complex measures required.