cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
aahmad28
Helper II
Helper II

how to use slicer value to filter a lookup value instead of slicer value

Hello I am using tree to display hierchy but it takes the root node to show the complete tree. What I want if we filter a child node, it still show me the complete tree from the donor to the last child. Once I put a slicer filter for donor it works fine. But I want to have slicer for all names and want that name to autofilter the donor and that will display the tree.

 

Screenshot 2.jpgScreenshot 1.jpg

2 ACCEPTED SOLUTIONS
sturlaws
Resident Rockstar
Resident Rockstar

Hi, 

 

first create this calculated column:

sturlaws_2-1654121971839.png

 

Then create a table with the distinct ids and names, without relationship to the main table:

sturlaws_0-1654121826304.png

 

Then create a measure like this:

sturlaws_3-1654122075715.png

 

Use the new measure as a filter for the tree visual, set it to equal 1, then create a slicer with the names from DimName to produce this:

sturlaws_1-1654121885595.png

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

 

How to Get Your Question Answered Quickly

View solution in original post

thanks a lot. it did worked. I really appriciate your help for solving the issue.

View solution in original post

7 REPLIES 7
v-yanjiang-msft
Community Support
Community Support

Hi @aahmad28 ,

Is your problem solved?? If so, Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.

Best Regards,
Community Support Team _ kalyj

sturlaws
Resident Rockstar
Resident Rockstar

Hi, 

 

first create this calculated column:

sturlaws_2-1654121971839.png

 

Then create a table with the distinct ids and names, without relationship to the main table:

sturlaws_0-1654121826304.png

 

Then create a measure like this:

sturlaws_3-1654122075715.png

 

Use the new measure as a filter for the tree visual, set it to equal 1, then create a slicer with the names from DimName to produce this:

sturlaws_1-1654121885595.png

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

 

How to Get Your Question Answered Quickly

This really helpful but I was looking for some different result. on my example the parent nodes are MT01003A & MT01023B. if I select any leaf of those or the parent node, it show me that specific tree. the solution you provided it will take the branch to that specific node and eliminate any other node for that   parent. I hope I was able to explain it clearly.

Below in the picture that is one tree and what I want is, if I filter on column "Name" from that specific tree either it is a parent or any leaf, it show me the complete tree for that specific parent, all its child and branches. There will be multiple trees like this, so once I filter on column "Name", it show me the complete tree from root to all the nodes in that tree.

Screenshot 3.jpg

expand the stand-alone dimension table to include the path:

sturlaws_0-1654810087466.png

 

and write the measure used for filtering like this:

sturlaws_1-1654810201705.png

which gives this:

sturlaws_2-1654810299247.png

 

thanks again for your response, I will try that and let you know,

question, if you check mark any from mt 5 to mt 11, will it show the same output currently shown?

yes:

sturlaws_0-1654811396377.png

 

thanks a lot. it did worked. I really appriciate your help for solving the issue.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors