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.
Hi all,
I'm a little confused by the following tutorial: Parent-child hierarchies – DAX Patterns.
The parent-child table looks like:
where:
EntityPath =
PATH ( Entity[EntityKey], Entity[ParentEntityKey] )
However, in my application of this concept.. I need to only preserve the longest unique path there is from the 'first' node.
So instead of results like (example):
1
1|1
1|9
2
2|4
2|4|8
2|4|8|9
3
3|5
3|6
3|5|8
4
I would like to see:
1|1
1|9
2|4|8|9
3|6
3|5|8
4
Is there a way to do this elegantly and directly through the PATH(...) -function?
Other suggestions are welcome 🙃
@zudar , there is pathlength function. with that, you can create a flag
You can use that
pathlen = pathlength([path])
new flag = if( maxx(filter(Table, [id] = earlier([ID])),[pathlen]) =[pathlen],1,0)
Which column(s) from the sample table would you use for [id] = earlier([ID])?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |