Product:
Microsoft Power BI Desktop
Issue:
Get error when create a path / Hierarki function in Power BI.
Try to follow this instructions: https://youtu.be/iwRqSl-_zvU?si=W0BTbtLd071_EiKD
Solution:
Error like: Each value in ‘Hierarki'[Konto] must have the same value in ‘Hierarki'[Konto_Parent]. The value ‘10000’ has multiple values.
When Konto is the child column, and Konto_Parent is the parent column. The PATH() function requires a strict one-parent-per-child hierarchy.
The part of the table that you import into the Power BI table, to build a Hierarki on, need to only have the lowest item ‘10000’ once in the ‘Konto’ column.
In the creation of the table, you need to filter better so you only get ONE item on each row;
Hierarki =
FILTER (
'ResultKonto',
'ResultKonto'[Typ] = "Intern RR" && 'ResultKonto'[area] = "xxx"
&& NOT 'ResultKonto'[Konto_KEY] IN {233, 250, 251, 252}
)
The solution code depends on your data, but try to work with && ‘ResultKonto'[area] = “xxx” to narrow the selection of data in your table.
Please also do not use hard coded KEY/ROWs in the selection, as this will be affected when the data is updated, and then maybe the wrong part is not included.
The value in the parent column “konto_parent” must exist in the child column “konto” – if it does not, you get a error like:
The value ‘xxx’ in ‘Hierarki'[Konto_Parent] must also exist in ‘Hierarki'[Konto]. Please add the missing data and try again.
More Information:
https://www.daxpatterns.com/parent-child-hierarchies/
https://simplebiinsights.com/power-bi-path-function-for-parent-child-hierarchies-in-dax/