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 there,
I have a table which has records with parent/child relationship. Some records has parent id defined in the parentid column which itself a record in the table
e.g.
Name | Parent
rec1 |
rec2 | rec1
etc
The scope is to show records which has any child record.
Can you please help and let me know the easiest way to achieve this?
The final design is to show a table with all records and toggle button to let them switch from all records and records with a childern
cheers
You want a calculated column in your table of records that will say TRUE if the record has a child (you can then create a slicer out of this column's values). Here's the formula:
[Has Child Records] = -- calculated column var __parent = T[Name] var __hasChildren = NOT ISEMPTY( FILTER( T, T[Parent] = __parent ) ) RETURN __hasChildren
Best
Darek
This works. Thanks a lot
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 |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
19 |