Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi
I have a hierachy in my listbar with 2 levels displaying the organization region on level 1 and the office location on level 2.
I want this listbar to filter the legend on a line chart in such a way that if a level 2 office is chosen in the listbar, the linechart shows sales for all offices in the region (level1) of that office. If a level 1 region is chosen in the listbar, the line chart should show all regions in the linechart. Keep in mind the listbar is also used to interact with other visualizations in a standard way.
| Region Level 1 | Office Level 2 | Sales |
| Vlaanderen 1 | Brugge | 10 |
| Vlaanderen 1 | Roeselare | 15 |
| Vlaanderen 2 | Hasselt | 25 |
| Vlaanderen 2 | Antwerpen | 30 |
| Vlaanderen 2 | Turnhout | 20 |
So if the listbar selected value is Brugge, the chart should show Brugge and Roeselare. If Antwerpen and Hasselt are selected, the chart should show Antwerpen, Hasselt and Turnhout. If Turnhout and Roeselare are selected, the chart should show all offices in the table. If the listbar selected value is Vlaanderen 2, the chart should show Vlaanderen 1 and Vlaanderen 2.
Is something like this possible? Thanks a lot for your help!
Solved! Go to Solution.
Hi @jvandyck ,
1. Based on level1:
Level1Slicer =
DISTINCT ( SELECTCOLUMNS ( 'Table', "Level 1", [Region Level 1] ) )Vla =
RIGHT ( [Region Level 1], 1 )level 1 =
VAR _sele =
RIGHT ( SELECTEDVALUE ( Level1Slicer[Level 1] ), 1 )
RETURN
IF ( _sele >= MAX ( 'Table'[Vla] ), 1, 0 )
2. Based on level2 (almost the same as 1)
Level2Slicer =
SELECTCOLUMNS ( 'Table', "Level 2", [Office Level 2] )level 2 =
VAR _sele =
ALLSELECTED ( Level2Slicer[Level 2] )
VAR _v =
SUMMARIZE (
FILTER ( ALL ( 'Table' ), 'Table'[Office Level 2] IN _sele ),
'Table'[Region Level 1]
)
RETURN
IF (
ISFILTERED ( Level2Slicer[Level 2] )
&& MAX ( 'Table'[Region Level 1] ) IN _v,
1,
0
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Eyelyn Qin
Hi @jvandyck ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it.
Best Regards,
Eyelyn Qin
Hi @jvandyck ,
1. Based on level1:
Level1Slicer =
DISTINCT ( SELECTCOLUMNS ( 'Table', "Level 1", [Region Level 1] ) )Vla =
RIGHT ( [Region Level 1], 1 )level 1 =
VAR _sele =
RIGHT ( SELECTEDVALUE ( Level1Slicer[Level 1] ), 1 )
RETURN
IF ( _sele >= MAX ( 'Table'[Vla] ), 1, 0 )
2. Based on level2 (almost the same as 1)
Level2Slicer =
SELECTCOLUMNS ( 'Table', "Level 2", [Office Level 2] )level 2 =
VAR _sele =
ALLSELECTED ( Level2Slicer[Level 2] )
VAR _v =
SUMMARIZE (
FILTER ( ALL ( 'Table' ), 'Table'[Office Level 2] IN _sele ),
'Table'[Region Level 1]
)
RETURN
IF (
ISFILTERED ( Level2Slicer[Level 2] )
&& MAX ( 'Table'[Region Level 1] ) IN _v,
1,
0
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Eyelyn Qin
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!