Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Guys,
I got 2 table visual from 2 different tables. I'm trying to filter 1st visual(master) (on click) to filter 2nd visual(child). And i want to click on 2nd visual returned rows without impacting 1st visual selection. In both tables i got "ID" common key. i am applying the below measure on child visual in filter (Control_child_table =1)
control_child_table =
VAR _id = SELECTEDVALUE('contact_master'[id])
VAR _fil_id = FILTER('contact_child', 'contact_child'[id] = _id)
VAR _condition = if(COUNTROWS(_fil_id)=1,1,0)
Return
IF(_condition =1,1,0)
When i click on 1st visual row its filtering child table view properly but as soon as i click on child view row my child view go blank. I believe i applied Interation properly, parent visual to child visual filter is on and 'None' from Child visual to Parent. Please guide why my child visual resetting to blank when i click on it. I'm using this PowerBI Desktop version(Version: 2.140.1078.0 64-bit (February 2025)
@Mel_aus Hello Mel,
Can you please try below measure?
control_child_table =
VAR _id = SELECTEDVALUE('contact_master'[id])
VAR _fil_id = FILTER('contact_child', 'contact_child'[id] = _id)
VAR _condition = IF(COUNTROWS(_fil_id) > 0, 1, 0)
RETURN IF(_condition = 1, 1, 0)
Thanks
Harish M
Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Hi Harish, thanks for you reply i tried this dax on child visual but when i click on child filtered rows it reset and show all the records. i'm using below relation in tables. thanks
Hi @Mel_aus Could you try with MAX function and check i am attaching a sample
Control_child_table =
VAR _id = SELECTEDVALUE('contact_master'[id])
RETURN
IF(
NOT(ISBLANK(_id)) && MAX('contact_child'[id]) = _id,
1,
0
)
Hi Akash, i tried this dax in measure and applied filter on 2nd visual but as soon as i click on child visual data it goes blank. Thanks for you suggestion.
Hi @Mel_aus Is the interactions enabled ? Like bewteen Parent and Child enabled and Child to Parent Disabled like kept to None ?
Yes. Parent to child visual is enabled and from child to Parent is kept None. I'm thinking it might be bug in PowerBI. Could you please able to create dummy data and see if it behave properly on your machine. It might be issue with my version of PowerBI.
Thanks Akash
Hi Akash, i created a dummy file but not sure how to attach here.
These are the screenshots of my issue. Thanks
when i click id=2 then data is filtering fine
when i click inside data in Child visual it goes blank
Hi @Mel_aus Could you try adding a selection for child also
Control_child_table =
VAR parent_id = SELECTEDVALUE(Parent[id]) -- Parent Table
VAR child_id = SELECTEDVALUE(Child[id]) -- Child Table
RETURN
IF(
NOT(ISBLANK(parent_id)) && (child_id = parent_id || ISBLANK(child_id)),
1,
0
)
I tried still when i click on Child visual data it goes blank. i also added screenshot of changed measure and show Interaction of child with parent visual. on child i applied that dax measure.
Could you please provide me the sample data in csv or xlsx
It won't let me attach file so i added sample data in below tables. Thanks
Parent Table
ID Name
1 | a |
2 | b |
3 | c |
4 | d |
5 | e |
Child Table
ID Name
1 | ab |
1 | cd |
1 | ef |
2 | gh |
2 | ij |
3 | kl |
3 | mn |
4 | op |
5 | qr |
Hi @Mel_aus
Control_child_table =
VAR parent_id = MAXX(ALLSELECTED('Parent Table'), 'Parent Table'[ID]) -- Get Parent ID, ignoring Child selection
VAR child_id = MAX('Child Table'[ID]) -- Current Child ID
RETURN
IF(
NOT(ISBLANK(parent_id)) &&
child_id = parent_id,
1,
0
)
Hi Akash, i updated with dax you mentioned above now its showing a value (5, qr) even when no row selected in parent view. I think main concern is when i cick id 1 on parent it filter in 2nd view but as soon as i click inside data in child visual it reset back to(5,qr). we need to preserve selected values based on parent view.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
73 | |
58 | |
36 | |
32 |
User | Count |
---|---|
90 | |
62 | |
61 | |
49 | |
45 |