Supposing that the histogram is an array of data, you only have to calculate the cumulated sum of all the array elements. Use a For loop, and a shift register to record the last calculated sum. There are a lot of other possible solutions, including integration vis.
See the attached vi.
CC
Chilly Charly (aka CC)