Forum Discussion

stepantuzil's avatar
stepantuzil
Regular Visitor
2 years ago
Solved

Cumulative Sum with changing division

Hello,  I'm trying to divide cummulativ sum with value from another column. I got rigth the cummulativ sum, but if I try to divide it, it divide the whole sum.. Data: Calendar Date  SUM_RT ...
  • stepantuzil's avatar
    2 years ago

    Hello, 
    I solved the problem. I used this measure:

    _Divide SUM = SUMX(Values('LISA PBI Development of Sales'[Calendar day.Calendar day Level 01]), Divide([Sum_sales],[MAX_correction]))

    Inside the cummulative measure:

    SUM_RT_w_correction = 
    CALCULATE(
        [_Divide SUM], 
        FILTER(
            ALL('LISA PBI Development of Sales'[Calendar day.Calendar day Level 01]),
            'LISA PBI Development of Sales'[Calendar day.Calendar day Level 01] <= MAX('LISA PBI Development of Sales'[Calendar day.Calendar day Level 01]) && 
            'LISA PBI Development of Sales'[Calendar day.Calendar day Level 01] >= MAX('PPC Project Materials'[Start of contract])
        )
    )

    Result in graph: 



    Have a nice day.