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
kfschaefer
Helper IV
Helper IV

help with Calculation

Need  help with modifying the following Measure Calculation.

Compliance%Measure = CALCULATE(1 - ((SUM([OnboardedNo]) - SUM([CompliantNo]))) / SUM([Services]), ALL(IcM[Service Usage]))

 

 

Sum of SvcCount  where Exception is “InScope”  sum of OnbaoredNo is 1  sum of CompliantNo is 1

divided by total rows with Exception is  “InScope”

 

What is the proper Dax syntax?

 

Thanks,

 

Karen

 

1 ACCEPTED SOLUTION
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi Karen,

 

Try this formula, please.

Compliance%Measure =
VAR onboardedNo =
    CALCULATE (
        SUM ( [OnboardedNo] ),
        table1[OnboardedNo] = 1,
        table1[exception] = "InScope"
    )
VAR compliantNo =
    CALCULATE (
        SUM ( [CompliantNo] ),
        table1[CompliantNo] = 1,
        table1[exception] = "InScope"
    )
VAR total =
    CALCULATE ( SUM ( [Services] ), table1[exception] = "InScope" )
RETURN
    CALCULATE (
        1
            - ( onboardedNo - compliantNo )
            / total,
        ALL ( IcM[Service Usage] )
    )

Best Regards,

Dale

Community Support Team _ Dale
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

3 REPLIES 3
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @kfschaefer,

 

Could you please mark the proper answer as a solution?

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi Karen,

 

Try this formula, please.

Compliance%Measure =
VAR onboardedNo =
    CALCULATE (
        SUM ( [OnboardedNo] ),
        table1[OnboardedNo] = 1,
        table1[exception] = "InScope"
    )
VAR compliantNo =
    CALCULATE (
        SUM ( [CompliantNo] ),
        table1[CompliantNo] = 1,
        table1[exception] = "InScope"
    )
VAR total =
    CALCULATE ( SUM ( [Services] ), table1[exception] = "InScope" )
RETURN
    CALCULATE (
        1
            - ( onboardedNo - compliantNo )
            / total,
        ALL ( IcM[Service Usage] )
    )

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Seward12533
Solution Sage
Solution Sage

Karen would avoide using special charcaters in your meaure names and it messes up intellisense for  auto populating underscore is OK but % will really cause problems. Also use the safe DIVIDE function versus / for division.

 

But I think its somethink like the followign but really need to take some time to learn the basics of PowerBI.  

 

Compliance Measure = CALCULATE(
   DIVIDE(1 - SUM(table[OnboardedNo] - SUM(table[CompliantNo]),COUNTROWS(table[Services]))
, ALL(IcM[Service Usage],table[Exception]="InScope")

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