Forum Discussion

tdhughes's avatar
tdhughes
New Member
3 years ago

Running total by binned count

OK, yes, I have searced for this.  My search expertise is clearly lacking but that's life sometimes.

 

I have a table like this:

BinBin MinBin MaxCountWhat I Want - Cumulative CountTry 1Try 2
0124198681986835504705393472
252549111153098349932554994180
50507441113509454382223564402
7575991702367965613895546876

 

My formula for try1:

COUNTROWS(filter(all('Table'),'Table'[E (Bins)]<=max('Table'[E (Bins)])))

 

My formula for try 2:

sumx(filter(all('Table'),'Table'[E (Bins)]<=max('Table'[E (Bins)])),DISTINCTCOUNT('Table'[FieldC]))
 
I've got to be close because I've done this on other non-binned things and it's been fine but on this, I just don't know.  I feel like I may be trying to do a sum when what I really need is a count but neither works for me.
 
I am also mystified as to why the total on try two decreases but that may be a problem for another post.
 
I'm looking forward to y'all's assistance!

2 Replies

  • Data Source looks like this:

    YearY2C_IDCEE (bins)
    2021-222021092.02E+108053210
    2021-222021092.02E+108108310
    2021-222021092.02E+108609010
    2021-222021092.02E+108647210
    2021-222021092.02E+108659210

     

    E is an integer ranging from 1 to 4,315, bins are created using the binning function and are on a 25 increment basis.  The count and cumulative counts are based on a distinct count of the "C" value - so the data shown here would yield a count of 5 for bin 0.