Forum Discussion

egrospe17's avatar
egrospe17
Frequent Visitor
4 years ago
Solved

Matrix total/subtotal row customization

Hello BI Gurus, I have a matrix visual in my power BI report which displays different data in each columns. On the total row on the bottom, is there a way to customize it? For example, on a column w...
  • v-zhangti's avatar
    4 years ago

    Hi, egrospe17 

     

    You can try to control total with a function.

    School Buses M =
    IF (
        HASONEVALUE ( 'Table'[School Buses] ),
        MAX ( 'Table'[School Buses] ),
        BLANK ()
    )
    
    Highway Lpeed Limit M =
    IF (
        HASONEVALUE ( 'Table'[Highway Lpeed Limit] ),
        MAX ( 'Table'[Highway Lpeed Limit] ),
        AVERAGE ( 'Table'[Highway Lpeed Limit] )
    )
    
    # of approach lanes M =
    IF (
        HASONEVALUE ( 'Table'[# of approach lanes] ),
        MAX ( 'Table'[# of approach lanes] ),
        SUM ( 'Table'[# of approach lanes] )
    )
    

     

    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.