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

Join 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.

Reply
Mel_aus
Frequent Visitor

interation between 2 visual to filter data

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)

16 REPLIES 16
HarishKM
Solution Sage
Solution Sage

@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

Mel_aus_0-1740782803071.png

 

Akash_Varuna
Community Champion
Community Champion

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.

@Mel_aus Sure I will get back to you

Thanks Akash

Hi Akash, i created a dummy file but not sure how to attach here. 

These are the screenshots of my issue. Thanks

Mel_aus_0-1740714313781.png

when i click id=2 then data is filtering fine

Mel_aus_1-1740714363702.png

when i click inside data in Child visual it goes blank

Mel_aus_2-1740714401446.png

Mel_aus_3-1740714629052.png

 

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.

Mel_aus_0-1740719724051.png

 

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

1a
2b
3c
4d
5e

Child Table

ID       Name

1ab
1cd
1ef
2gh
2ij
3kl
3mn
4op
5qr

 

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
)

Screenshot 2025-02-28 113043.pngScreenshot 2025-02-28 113054.png

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.

Mel_aus_0-1740732948981.png

 

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.