Forum Discussion
DIVIDE Formula Not Working
I created 2 measures to calculate 1-employees that were hired (EID for yes and yes) 2- total rotations counts the total number YTD. Then for Rotation hires % converted the % keeps coming up as 0 in my chart. Does anyone have an idea what I am missing? Thank you
3 Replies
- AnonymousNot applicable
Hi lasimmons1 ,
Can you please show the DAX for these two MEASURES as well? Maybe it's because you didn't use the "ALL" or "ALLSELECTED" function for these two measures and it didn't remove the filtering effect.
If you can, it would be helpful if you could provide a bit of sample data, DAX, and expected results.
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- lasimmons1New Member
Thank you. The first measure counts the number of employees hired in 2023.
Measure- Employee ID for Yes =CALCULATE(COUNTA('IMR'[Employee ID]), 'IMR'[Hired in 2023] IN { "Yes" })This 2nd meausre is calculating the results of the first measure to find the employees hired in 2023 that completed a rotation.Measure- Employee ID for Yes for yes =CALCULATE([Employee ID for Yes], 'IMR'[Completed Rotation] IN { "yes" })The 3rd measure is counting total number of rotations for the year.Measure- Total Rotations =COUNTA('Rotations Merge'[Specialized Rotation Type])The 4th measure is to bring it all together it is dividing the 2nd measure by the 3rd measure to get % of total rotation students we hired in 2023. (example if we hired 100 out of 137 then it would be 0.73%)Measure- Rotation Hires % Converted Measure =DIVIDE([Employee ID for Yes for yes], [Total Rotations])The goal is to determine how many rotation students we hired/converted to employees.Thanks.- AnonymousNot applicable
Hi lasimmons1 ,
I created some sample data and tested it myself, but the test result is that there is no problem with these DAX, here are the test results:
It would be best if you could provide me with sample data from both tables and the relationships between the two tables, and please let me know which visual object you are using and which fields are placed in that visual object. Different visual objects and different placement of fields will also result in different values returned by the measure.
Best Regards,
Dino Tao