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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Shannon_Leong
Helper I
Helper I

R hierarchical slicer

Hi community, I am trying to create a hierarchical slicer in RStudio. The slicer should look like the one in powerbi, that shows the ascending and descending parent child relationship, with around 5 or more hierarchy levels. (allow for multiple selection of entity code) Can anyone help, thank you! 

4 REPLIES 4
Idrissshatila
Super User
Super User

Hello @Shannon_Leong ,

 

refer to this video https://youtu.be/1Y0T_KkeWyQ?si=SQHa6ZNc0Ftv4coi

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hi @Idrissshatila Thank you for replying. I am able to create a descending hierarchy just fine. However, due the logic of my data, i am not able to create a hierarchical slicer that will display the ascending hierarchy. Furthermore, I find that using the PATH() formula feels abit "hardcoded" therefore I am trying to find a more automated solution than what I have now. Below is a sample of my data, Thank You! 

EntityCodeParentCodePathReversePath1ReversePath2ReversePath3
1001100110011001  
100210011001|100210021001 
100310011001|100310031001 
100410011001|100410041001 
100510011001|100510051001 
100610031001|1003|1006100610031001
100710031001|1003|1007100710031001
100810041001|1004|1008100810041001
100910041001|1004|1009100910041001

@Shannon_Leong ,

 

try putting these three columns in one slicer above each others, or if you want them in a visual put them above each others.

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hi @Idrissshatila, I have tried to do so. However, the slicer did not filter my legal entity chart as the entity codes are grouped in its unique values... To explain (based on the table below), if i were to write the first SQL statement, I would get 2 rows in my output. If i wrote the second statement, I would get 8 rows in my output... I hope this gives a rough idea of the logic behind my data. Thank you!

SELECT*FROM Table 1 GROUPBY Level 1
SELECT*FROM Table 1 GROUPBY Level 2

 

Level 1Level 2
a1
a2
a3
a4
b5
b6
b7
b8

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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