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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
EaglesTony
Responsive Resident
Responsive Resident

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
Super User
Super User

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
Responsive Resident
Responsive Resident

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
Super User
Super User

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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