Forum Discussion
Add index to hierarchy leves for later sorting
- 6 years ago
Hi rdiazjimenez
Agree with dax , don't understand the requirement from 2)
Technically, you could limit the number of levels in the fnAllParents step by adding a limit on the Level in the List.Generate function:
each Table.RowCount([Result]) > 0
each Table.RowCount([Result]) > 0 and Level <= YourMaxLevel
Hi rdiazjimenez
Agree with dax , don't understand the requirement from 2)
Technically, you could limit the number of levels in the fnAllParents step by adding a limit on the Level in the List.Generate function:
each Table.RowCount([Result]) > 0
each Table.RowCount([Result]) > 0 and Level <= YourMaxLevel
Thank you both ImkeF and dax ,
I tried at that line, but missed that the one that I had to limit was [Level] and not Table.RowCount([Result])
so Imke's solution was correct by adding the surrounding brackets.
each Table.RowCount([Result]) > 0 and [Level] <= YourMaxLevel
- ImkeF6 years ago
Community Champion
Great to hear rdiazjimenez ! Please mark the answers then.
Thanks.
- dax6 years ago
Community Support
Hi rdiazjimenez,
It seems that you solve this problem, right?If so and if you'd like to, you could mark corresponding post as answer or share your solutions. That way, people who in this forum and have similar issue will benefit from it.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.