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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Fusilier2
Helper V
Helper V

Measure returning zero

Can anybody see where I gone wrong with this measure:

KPI Incr good % Total =
VAR Excl_Casuals_MOM =
IF(HR_data[Headcount Excl Casuals month on month]>0,1,0)
VAR Apprentices_MOM=
IF(HR_data[Apprentices month on month]>0,1,0)
VAR mytest =12
RETURN
DIVIDE(
    (Excl_Casuals_MOM+Apprentices_MOM),
    mytest)
 
As the first two variables both return 1 I'm expecting to see 0.166 (16.6%) calculated from  2/12. Instead its returning zero.

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Fusilier2 , Try using

DAX
KPI Incr good % Total =
VAR Excl_Casuals_MOM =
IF(HR_data[Headcount Excl Casuals month on month] > 0, 1, 0)
VAR Apprentices_MOM =
IF(HR_data[Apprentices month on month] > 0, 1, 0)
VAR mytest = 12
VAR Total_MOM = Excl_Casuals_MOM + Apprentices_MOM
RETURN
DIVIDE(Total_MOM, mytest)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
bhanu_gautam
Super User
Super User

@Fusilier2 , Try using

DAX
KPI Incr good % Total =
VAR Excl_Casuals_MOM =
IF(HR_data[Headcount Excl Casuals month on month] > 0, 1, 0)
VAR Apprentices_MOM =
IF(HR_data[Apprentices month on month] > 0, 1, 0)
VAR mytest = 12
VAR Total_MOM = Excl_Casuals_MOM + Apprentices_MOM
RETURN
DIVIDE(Total_MOM, mytest)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Thank you!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.