Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Automate Hierarchy Slicer

Hi Community, is there any other approach to make hierarchy slicer automated? Right now i am using Path() formula in Powerbi, after this formula, I created five columns because my hierarchy has five levels. But if I were to put in a new file with new codes and more levels, my slicer would not work anymore. So if there some sort of function I can create so that my slicer can automatically adapt to the data? 

  • Anonymous  - there's a parameter in the function for 'max steps' = you need to set that to 5, or whatever max number you expect to have. For putting it into the slicer, you'd need to load all the columns into the slicer in preparation for having data in there. Not ideal, but you've posed a tricky question. 

6 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi AllisonKennedy thank you for your reply. This is how my data looks like currently. But I wish to automate this solution such that if i added in more data with more hierarchy levels, the slicer will auto adapt to it and create more columns. Currently I have 5 hierarchy levels. There are only three displayed below... 

      EntityCodeParentCodePathReversePath1ReversePath2ReversePath3
      1001100110011001  
      100210011001|100210021001 
      100310011001|100310031001 
      100410011001|100410041001 
      100510011001|100510051001 
      100610031001|1003|1006100610031001
      100710031001|1003|1007100710031001
      100810041001|1004|1008100810041001
      100910041001|1004|1009100910041001
  • ChandanaMB13's avatar
    ChandanaMB13
    Frequent Visitor

    Hi having a similar requirement, could you please share the solution