Forum Discussion

Vamshi2020's avatar
Vamshi2020
Icon for Helper II rankHelper II
5 years ago
Solved

Cumulative not working with sumx

I have a Table with few columns such as member id, start date, end date , provider name etc, value etc...my value column is a calculated column with value=1 formula. so this column contains 1 for all...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Vamshi2020 

    I think you want to calculated the sum for each member id.

    Due to I don't know your data model, I build a sample to have a test.

    Sample:

    I think you want to get Sum for ID 1 = 2, Sum for ID 2 =1, Sum for ID 3 =2.

    Measure:

    Cumulative = SUMX(FILTER(ALL('Table'),'Table'[ID]=MAX('Table'[ID])),'Table'[Value])

    Result is as below:

    Calculated column:

    Sum value for each id = SUMX(FILTER('Table','Table'[ID]=EARLIER('Table'[ID])),'Table'[Value])

     Result is as below.

    Best Regards,

    Rico Zhou

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.