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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.