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
finley0726
Frequent Visitor

Need average to include 0s

I have a measure that calculates voluntary turnover and if it is blank, it returns 0. When I try to visualize turnover by region and company in a matrix (Region and Company at the row level), it does not include these 0s in the average. For example:
REGION 1                 12.50%
Company A              12.50%
Company B                   0%
Company C                   0%
Company D                   0%
Company E                    0%

 

REGION 1 shows average of 12.50% when it should be 2.5%. How do I get this measure to include the zeros when visualizing the average in a matrix?

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @finley0726 

 

For your question, here is the method I provided:

 

Measure = 
var _CountCompany = 
    CALCULATE(
        COUNTROWS('Table'), 
        FILTER(
            ALL('Table'), 
            'Table'[Region] = MAX('Table'[Region])
        )
    )
var _TotalVoluntaryTurnover = 
    SUMX(
        FILTER(
            ALL('Table'), 
            'Table'[Region] = MAX('Table'[Region])
        ), 
        'Table'[voluntary turnover]
    )
RETURN 
IF(
    'Table'[voluntary turnover] <> 0, 
    _TotalVoluntaryTurnover / _CountCompany, 
    0
)

 

Create a matrix.

 

vnuocmsft_0-1718936780064.png

 

vnuocmsft_1-1718936792762.png

 

 

Regards,

Nono Chen

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

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @finley0726 

 

For your question, here is the method I provided:

 

Measure = 
var _CountCompany = 
    CALCULATE(
        COUNTROWS('Table'), 
        FILTER(
            ALL('Table'), 
            'Table'[Region] = MAX('Table'[Region])
        )
    )
var _TotalVoluntaryTurnover = 
    SUMX(
        FILTER(
            ALL('Table'), 
            'Table'[Region] = MAX('Table'[Region])
        ), 
        'Table'[voluntary turnover]
    )
RETURN 
IF(
    'Table'[voluntary turnover] <> 0, 
    _TotalVoluntaryTurnover / _CountCompany, 
    0
)

 

Create a matrix.

 

vnuocmsft_0-1718936780064.png

 

vnuocmsft_1-1718936792762.png

 

 

Regards,

Nono Chen

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

 

aduguid
Super User
Super User

Average Voluntary Turnover by Region = 
    AVERAGEX(
        SUMMARIZE(
            YourTableName, 
            YourTableName[Region], 
            "VoluntaryTurnover", [Voluntary Turnover]
        ), 
        [VoluntaryTurnover]
    )

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.