Forum Discussion

spagad6263's avatar
spagad6263
Icon for Post Patron rankPost Patron
1 year ago
Solved

How to add Grand total to Matrix?

Hi,

 

I've below matrix and with Subtotal in below picture. I would like to add another row, which show % Total. 

It should shows like 

%Total    35%.

 

Can you suggest how I could add this new row? I am wondering if this can be added to Grand Total row? Thanks

 

 

 

  • Hi,

    I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

    One of ways to achieve this is to configure the format-setting of matrix visualization under "Row subtotal" section, like below image.

    Please check the below Link (Microsoft Learn), picture, and the attahced pbix file.

     

    Matrix visual format settings - Power BI | Microsoft Learn

     

     

     

     

     

     

    Count measure: = 
    IF ( NOT ISINSCOPE( result[category] ), BLANK (), SUM ( result[count] ) )

     

     

     

    Stage measure: = 
    SWITCH (
        TRUE (),
        ISINSCOPE ( result[Result] ), BLANK (),
        ISINSCOPE ( result[category] ), FORMAT ( SUM ( result[stage_count] ), "#,#0" ),
        FORMAT ( SUM ( result[count] ) / SUM ( result[stage_count] ), "#0.00%" )
    )

     

     

2 Replies

  • Hi,

    I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

    One of ways to achieve this is to configure the format-setting of matrix visualization under "Row subtotal" section, like below image.

    Please check the below Link (Microsoft Learn), picture, and the attahced pbix file.

     

    Matrix visual format settings - Power BI | Microsoft Learn

     

     

     

     

     

     

    Count measure: = 
    IF ( NOT ISINSCOPE( result[category] ), BLANK (), SUM ( result[count] ) )

     

     

     

    Stage measure: = 
    SWITCH (
        TRUE (),
        ISINSCOPE ( result[Result] ), BLANK (),
        ISINSCOPE ( result[category] ), FORMAT ( SUM ( result[stage_count] ), "#,#0" ),
        FORMAT ( SUM ( result[count] ) / SUM ( result[stage_count] ), "#0.00%" )
    )