I think in order to answer this usefully, we need more details about what you want to do. Which pieces of the formula do you want to be continuous, and which can stay discrete? Is there an easy example which you could include?
At the bare minimum, if $X$ isn't finite, then you'll have to replace the power set of $X$ with something else in order to make any sense of that sum.