Forum Discussion

Magesen_Muniand's avatar
Magesen_Muniand
New Member
1 year ago
Solved

Additional row for Matrix table

Hi How can i show additional row (Staff ID) for matrix table? in this scenario i wanted to show Staff ID next to Staff Name. Pls advise. TQ
  • Anonymous's avatar
    Anonymous
    1 year ago

    Thank you shafiz_p and Payeras_BI 

    Hi, Magesen_Muniand 

    Based on your description and the screenshots shown, I've created the following sample data:

    If you want to add a column next to name, then you need to make a header table:

    Sort the name column by sortID:

    Create the following three measures:

    ID = MAX('Table'[Staff ID])
    ProductValue = 
    VAR _product = SELECTEDVALUE(HeaderTable[Name])
    RETURN CALCULATE( SUM('Table'[Value]),'Table'[Product] = _product)
    Measure = SWITCH(TRUE(),
    SELECTEDVALUE(HeaderTable[Name]) = "Staff ID",[ID],
    [ProductValue]
    )

    Create a matrix:

     

     

    How to Get Your Question Answered Quickly

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

    Best Regards

    Jianpeng Li

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.