Forum Discussion

kirby001's avatar
kirby001
Frequent Visitor
2 years ago
Solved

Hide certain row headers

I have a matrix in that is essentially a league table of metrics by staff member. This table is going to be used in 1-1s so will be shown to the staff member. I want to be able to select a staff memb...
  • kirby001's avatar
    2 years ago

    Thanks for the response, not quite what I was after but very useful.

     

    I have managed to self solve so adding my solution in case its helpful to anyone going forward.

     

    Blanked out all the actual metrics here but when a primary_resource is selected in the slicer, the table matrix remains unchanged other than the unselected primary resources are now blank. This allows this to be used as a "league table" while keeping the unselected names confidential.

     

    This has been acheived by hiding the row headers entirely and using a measure to create row headers instead. Measure as follows

     

    Selected_Primary_Resource = 
    VAR FilterName = IF(
        HASONEVALUE(Provisioner[Primary_Resource]),
        VALUES(Provisioner[Primary_Resource]),
        BLANK()
    )
    RETURN
    IF(
        HASONEVALUE(OT_Temp[Primary_Resource]),
        IF(
            ISBLANK(FilterName),
            VALUES(OT_Temp[Primary_Resource]),
            IF(
                VALUES(OT_Temp[Primary_Resource]) = FilterName,
                VALUES(OT_Temp[Primary_Resource]),
                BLANK()
            )
        ),
        BLANK()
    )

     

    The provisioner table is an unlinked table so when a single provisioner is selected, only their name appears and the others are blank.

     

    Sorry if the explanation is rubbish. Hope this helps someone in future. Would be great if powerbi could add conditional formatting options to row headers so this would be much simpler to achieve.