I've noticed that iPhones sometimes don't show the battery usage by app in Settings > Battery. The iPhones are otherwise working perfectly fine. I'm seeing this happening in iPhone 6 and 5s at least. The iPhone has not been erased or restored yet it sometimes doesn't show this information sometimes. The next day you check and it shows the usage for the last seven days, then another moment it shows nothing. The iPhones have lots of free storage space. There're no panics reported in Settings > Privacy > analytic data. This happens regardless of having just restarted the iPhone or not. Why does the iPhone have these memory losses?
Power usage logs are a low priority item and if that subsystem crashes or the device runs low on space, I've seen it nor populate until a restart. If you restart and the battery isn't 100% - that also suppresses the usage.
In dire cases - a backup and restore is needed to remedy the software and filesystem issues that could cause this function to not work at all.