Forum Discussion

ryanLewis's avatar
ryanLewis
Frequent Visitor
8 years ago
Solved

Running Total Reset based on Column Attribute

I've been struggling to implement this correctly. I have a cumulative running total for a stock item (Cusquena in this example). That part is working fine. What I need it to do however is reset to a ...
  • Anonymous's avatar
    Anonymous
    8 years ago

    ryanLewis,

    I make a test using the sample data you post, and create the following measures in the table.

    Measure 4 = MAXX(FILTER(ALLSELECTED(Table4),Table4[First EntryType]="Count"&&Table4[DateMain]<=MAX(Table4[DateMain])),Table4[DateMain])

    Run stock = CALCULATE(SUM(Table4[Mvnt Quantity]), DATESBETWEEN(Table4[DateMain],[Measure 4],LASTDATE(Table4[DateMain])))




    Regards,
    Lydia