Forum Discussion

A_a_a's avatar
A_a_a
Helper III
3 years ago
Solved

Subtotals - different rules for different columns

Hi All,

 

I have a matrix table, with measures as values. Measures are calculated based on Places, but when I create the matrix table I want to show Councils as well.

Is there any possibility to show subtotals in some columns, and leave it empty in others?

 

Once I use this:

I can see all subtotals, not sure if there is a tool to split it or maybe I can add some information to the measure?

Please help.

 

G.

  • Hi, A_a_a 

     

    You can try the following methods.

    Sample data:

    Measure:

    A = SUM('Table'[Value])
    B = DIVIDE(SUM('Table'[Value]),CALCULATE(SUM('Table'[Value]),ALL('Table')))
    Measure A = IF(HASONEVALUE('Table'[Type]),[A],BLANK())
    Measure B = IF(HASONEVALUE('Table'[Type]),[B],BLANK())

    Row total is always on. But Dax can control whether Total outputs blank or numeric.

    Best Regards,

    Community Support Team _Charlotte

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

     

5 Replies

  • A_a_a , In subtotal you have an option for per row level, You can enable and disable subtotal once you use that

  • Hi amitchandak,

     

    thank you for your reply.

    If I use the function that you mentioned above I will see subtotals (on/off) for all columns.

    My question is if I can have it on only for two columns as I showed in the picture above ( 2 - on, 2 off).

     

    Thanks,

    G.

  • Hi,

    The measure of those 2 columns can be modified.  Share the download link of the PBI file.

  • v-zhangti's avatar
    v-zhangti
    Community Support

    Hi, A_a_a 

     

    You can try the following methods.

    Sample data:

    Measure:

    A = SUM('Table'[Value])
    B = DIVIDE(SUM('Table'[Value]),CALCULATE(SUM('Table'[Value]),ALL('Table')))
    Measure A = IF(HASONEVALUE('Table'[Type]),[A],BLANK())
    Measure B = IF(HASONEVALUE('Table'[Type]),[B],BLANK())

    Row total is always on. But Dax can control whether Total outputs blank or numeric.

    Best Regards,

    Community Support Team _Charlotte

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