Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
AlixB
Frequent Visitor

How do I calculate the grand total in a matrix differently to the way the column is calculated

I have a matrix where I have 2 calculated measure columns:

Available Hours = sum('Dates'[Hours])-(sum('Reliability Data'[Planned Outage])+sum('Reliability Data'[Unplanned Outage]))
and
Availability = IFERROR((sum('Dates'[Hours])-sum('Reliability Data'[Planned Outage])-sum('Reliability Data'[Unplanned Outage]))/(sum('Dates'[Hours])),1) 
 
They produce a percentage or value of total time available of the total time once time outages are removed.
so the way the grand totals are calculated is done in exactly the same way, however it is meaningless and needs to be an average of the columns vlaues.
 
AlixB_0-1628758520182.png

 

How do I get the totals as an average rather than the same calculations as the rest of the column?

3 REPLIES 3
Mohammad_Refaei
Solution Specialist
Solution Specialist

Try this:

Availability =
VAR MyVar =
    IFERROR (
        (
            SUM ( 'Dates'[Hours] ) - SUM ( 'Reliability Data'[Planned Outage] )
                - SUM ( 'Reliability Data'[Unplanned Outage] )
        )
            / ( SUM ( 'Dates'[Hours] ) ),
        1
    )
RETURN
    IF (
        ISINSCOPE ( 'Reliability Data'[TAG] ),
        // [TAG] or any field you will use in your matrix
        MyVar,
        AVERAGEX ( 'Reliability Data', MyVar )
    )

Unfortunately that returns the same results as I currently have in both the column and the total

Then try this:

Availability =
VAR MyVar =
    IFERROR (
        (
            SUM ( 'Dates'[Hours] ) - SUM ( 'Reliability Data'[Planned Outage] )
                - SUM ( 'Reliability Data'[Unplanned Outage] )
        )
            / ( SUM ( 'Dates'[Hours] ) ),
        1
    )
RETURN
    IF (
        ISINSCOPE ( 'Reliability Data'[TAG] ),
        // [TAG] or any field you will use in your matrix
        MyVar,
        MyVar
            / COUNTROWS ( SUMMARIZE ( 'Reliability Data'[TAG], 'Reliability Data'[SYSTEM] ) )
    )

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors