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
Dayna
Helper V
Helper V

Sum / Count of Measure Value

Hello,

 

Ultimately, I want a count of servers where a record in a related table doesn't exist. So far, I've done the inverse, I calculate if we've done a test with the following:

CountOfSystemsTestedALL = 
CALCULATE (
    DISTINCTCOUNT ( 'DR Server'[Id] ),
    FILTER ( 'DR TestingLog', 'DR TestingLog'[TestDate] <> BLANK () ), FILTER(ALLSELECTED('DR Server'), 'DR Server'[ServerStatus] = "LIVE")
)

Then I work out the opposite:

NotTestedFlag = if([CountOfSystemsTestedALL]=1,0,1)

This basically gives me a value of 1 against all servers where we haven't tested it. All OK so far..

 

What I want, feels really basic, is a sum / count of these records. i.e. if there's 20 servers where the NotTestedFlag is 1, I want to sum and get a value of 20. Everything I do doesn't seem to work!

 

Many thanks for your help!

 

Kind Regards,

Dayna

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Dayna 

 

Is it maybe possible to do something like below?

 

Sum of tested servers =
SUMX (
    SUMMARIZE ( 'DR Server', 'DR Server'[Id], "Value", [NotTestedFlag] ),
    [Value]
)

Pct tested = [Sum of tested servers] / DISTINCTCOUNT('DR Server'[Id])

The summarize should return a list where your measure [NotTestedFlag] is calculated for each server ID and then it is summed by the SUMX.

I'm assuming that the denomiator your %-measure is the number of servers.

 

If this works then please mark it as the accepted solution.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Dayna 

 

Is it maybe possible to do something like below?

 

Sum of tested servers =
SUMX (
    SUMMARIZE ( 'DR Server', 'DR Server'[Id], "Value", [NotTestedFlag] ),
    [Value]
)

Pct tested = [Sum of tested servers] / DISTINCTCOUNT('DR Server'[Id])

The summarize should return a list where your measure [NotTestedFlag] is calculated for each server ID and then it is summed by the SUMX.

I'm assuming that the denomiator your %-measure is the number of servers.

 

If this works then please mark it as the accepted solution.

Anonymous
Not applicable

You're welcome.

 

If you have tried to use DAX studio then you can see the table which summarize creates by writing the following:

EVALUATE
SUMMARIZE ( 'DR Server', 'DR Server'[Id], "Value", [NotTestedFlag] )

The "Value" can be though of as a calculated column containing the measure NotTestedFlag, whereas [Value] is refering to this exact column.

The measure is therefore the sum of a calculated column in a flexible table.

 

That seemed to work! Thank you! Can you explain to me how the "value" and [value] works in that, please?

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
Top Kudoed Authors