StewartArmbrecht
StewartArmbrecht

Reputation: 1251

Power BI Hierarchy Table Visual

I would like to display a hierarchy of records in a table format that can display properties for the parent record (that are not aggregates of the child record values) and allow you to expand and collapse the parent record to see the child records. 

I would like to display the below table.  The status and description values on the parent records are unique to the parent.  I would like to be able to expand and collapse the parent records to display or hide the child records.

Is there a way to do this?

Work Items    |  Status | Description

'- Parent 1       | Green | Collect and parse information.

    Child 1.1    | Yellow | Confirm list of data.

    Child 1.2    | Green  | Blah blah blah

'- Parent 2       | Green | Collect and parse information.

    Child 2.1    | Yellow | Confirm list of data.

    Child 2.2    | Green  | Blah blah blah

'+ Parent 2       | Green | Collect and parse information.

Upvotes: 0

Views: 1393

Answers (1)

Olly
Olly

Reputation: 7891

Use a Matrix visualisation, and enable +/- icons in Row headers.

For your measures, you can use HASONEFILTER to check the hierarchy level - something like:

StatusHierarchy = 
SWITCH ( 
    TRUE(),
    HASONEFILTER ( TableChild[Item] ), VALUES ( TableChild[Status] ),
    HASONEFILTER ( TableParent[Parent Item] ), VALUES ( TableParent[Status] ),
    BLANK()
)

See https://pwrbi.com/so_55633211/ for an example PBIX file

Upvotes: 2

Related Questions