Forum Discussion

Rigolleto's avatar
Rigolleto
Resolver I
7 years ago
Solved

Sum up a previous record

Hi,

 

I need some logic to read a previous record, as the screenshot shown, you ca notice that my data is gruped by, deparment, Buyername, attribute(Name of the week) and Years(NOTICE that there are two years), I would like to sume up the value column base in this grouping and create a new coulmn with the value, for instance:

24-HENDRICKSON, SAMUEL-(2019/2018)-541,353(this is the new coulmn calulated, will not be a big deal for me if this value is duplocated for every year

 

Any comment or help!!!!

 

Thanks in advance

 

 

  • Rigolleto ,

     

    Have you solved your issue by now? If you have, could you please help mark the correct answer to finish the thread? Your contribution will be much appreciated.

     

    Regards,

    Jimmy Tao

3 Replies

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Rigolleto ,

     

    You can create a measure using DAX below:

    Total =
    CALCULATE (
        SUM ( Table[Value] ),
        ALLEXCEPT (
            Table,
            Table[DEPARTMENTDESC],
            Table[BUYERNAME],
            Table[Attribute],
            Table[Years]
        )
    )
    

    Community Support Team _ Jimmy Tao

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

  • v-yuta-msft's avatar
    v-yuta-msft
    Community Support

    Rigolleto ,

     

    Have you solved your issue by now? If you have, could you please help mark the correct answer to finish the thread? Your contribution will be much appreciated.

     

    Regards,

    Jimmy Tao