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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
EaglesTony
Post Prodigy
Post Prodigy

How do I get a table filled based on another table

Hi,

 

  I have a datasource table, which has

 

Type            Key           Parent

Solution      S123         T123

Solution      S456         T123

Feature       F123          S123

Feature       F456          S123

Feature       F999          S123

 

1) I have a slicer which has all the Keys where the Type=Solution

2) I have Table1 on the report that shows all the Solutions and is driven by the slicer (All=show all or select a specific Solution Key, i.e. S123)

 

3) The next table on the report, is where I need to show the following if S123 Solution is selected:

F123

F456

F999

 

1 ACCEPTED SOLUTION
NaveenGandhi
Memorable Member
Memorable Member

Hi @EaglesTony 

Check the attached for the solution. I have created a disconnected table for slicer and used 2 measures as visual level filter.

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

Here's my approach

  1. Create another table (Table1) of all the unique key
  2. Create the following relationships:
    1. Many to One and Active from the Key column of the Data Table to Table1
    2. Many to One and Inactive from the Parent column of the Data Table to Table1
    3. To your slicer, drag Key from the Table1
    4. To the Table visual, drag Type and write this measure

Measure = calculate(countrows(Data),userelationship(Data[Parent],Table1[Key]))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
EaglesTony
Post Prodigy
Post Prodigy

I was thinking maybe some way using the "selected value" of the table selection ? or since they data is in the same table trying to setup a parent/child relationship, not sure if self-relationships are allowed?

NaveenGandhi
Memorable Member
Memorable Member

Hi @EaglesTony 

Check the attached for the solution. I have created a disconnected table for slicer and used 2 measures as visual level filter.

If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

Follow me on LinkedIn!!!

Can you post the code here ?

@EaglesTony 

below 2 measures are used as visual level filter, The slicer value comes from a disconnected table.

t1_filter =

if(SELECTEDVALUE('Table'[Key]) in VALUES(Solutions[Table_Key]),1,0)

t2_filter =

if(SELECTEDVALUE('Table'[Parent]) in VALUES(Solutions[Table_Key]),1,0)

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.