Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Build the table with values accumulated

Hi all,

I have a table below:

 I need to build a table with values  accumulated like this:
I intend to accumulate values per year.

 I need to build using dax and I am trying to use summarizecolumns, but I am not getting the accumate columns.

Probably I am making some mistake.

Could someone help me please? Thanks

  • Hi, Anonymous 

    If you are looking for creating new column, 

    please try the below.

     

    Value Accumulate Column =

    Value Accumulate Column =
    CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER (
    ALLEXCEPT ( 'Table', 'Table'[Priority] ),
    'Table'[Date] <= EARLIER ( 'Table'[Date] )
    && 'Table'[Priority] <= EARLIER ( 'Table'[Priority] )
    )
    )
     

    Hi, My name is Jihwan Kim.

    If this post helps, then please consider accept it as the solution to help other members find it faster.

4 Replies

  • Anonymous , Create  a new column like

     

    sumx(filter(Table, [Date] <=earlier([Date]) && [priority] = earlier([priority])), [value])

     

    or a new measure

    sumx(filter(allselected(Table), [Date] <=max([Date]) && [priority] = max([priority])), [value])

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks, but don´t work

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • Hi, Anonymous 

    If you are looking for creating new column, 

    please try the below.

     

    Value Accumulate Column =

    Value Accumulate Column =
    CALCULATE (
    SUM ( 'Table'[Value] ),
    FILTER (
    ALLEXCEPT ( 'Table', 'Table'[Priority] ),
    'Table'[Date] <= EARLIER ( 'Table'[Date] )
    && 'Table'[Priority] <= EARLIER ( 'Table'[Priority] )
    )
    )
     

    Hi, My name is Jihwan Kim.

    If this post helps, then please consider accept it as the solution to help other members find it faster.