Do you mean you're interested in finding the electricity cost/use per block found? Because electricity cost per hash doesn't change with difficulty, that only changes with the gear used to mine on. An Antminer S5 will always hash at 1155GH/s while using ~ 590W, so it's "hash efficiency" will always be 1.96GH/s per watt. However as the difficulty increases, it'll cost more on average to find a block with an S5, because it'll take longer to do so.

I worded that badly - yes I'm after the cost per hash, which will then let you calculate the cost per block.

I think are making something fairly simple into something confusing.

Your machine has X hash your machine cost Y. You do X divided by Y. You now have the exact value of your "interesting metric to estimate".

Then you need to select a timeframe, like 1 day and see the average PH for current difficulty vs how many blocks.

You do a simple PHs/blocks over one day averaged and you have your "metric" down to something fairly accurate.

Then you divide your second metric with your $/gh value and bam. You now know how much $ you need in term of GHS to get 1 block per day average.

Now we assumed free electricity but of course you would compare J/GH of the hardware you would buy to see which is more favorable over time.