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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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