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,
According to your code sample, it seems that you have solved your part of your problem. But I don't understand your requirement.
If possible, could you please explain " Limit the number of levels calculated to a certain number (in order to not beak hierarchy in PowerPivot) (if possible)" to me?
Best Regards,
Zoe Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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
- rdiazjimenez6 years agoFrequent Visitor
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.