Forum Discussion

KH11NDR's avatar
KH11NDR
Icon for Helper IV rankHelper IV
8 years ago
Solved

How do i create a calculated column or measure for totalling up another column as cumulative?

Hi Guys,

 

This is what I want to do, create another column or measure that calculates Total sales per month per project.  My data is exactly how it is in the table without the "Total Sales" column i'm asking help for.

 

Thanks

 

ProjectDateSalesTotal Sales
A01/01/20181010
A01/02/20182030
A01/03/20183060
A01/04/201840100
A01/05/201850150
B01/01/201855
B01/02/20181015
B01/03/20181530
B01/04/20182050
B01/05/20183080

12 Replies

  • shebr's avatar
    shebr
    Icon for Resolver III rankResolver III

    HI KH11NDR

     

    Have you tried using the quick measures to try and get your result? Right click on your dataset and select 'Quick Measure'. Select your value and any other options and this may give you what you want.

     

    Let us know how you get on.

     

    Thanks

     

    shebr

    • KH11NDR's avatar
      KH11NDR
      Icon for Helper IV rankHelper IV

      I was just trying that, 

       

      I selected Running total calculation, Base value as Sales and Field as Project, I was hoping that would have worked, but It's giving the same figures in the month rather than do a runninig total as expected.

    • KH11NDR's avatar
      KH11NDR
      Icon for Helper IV rankHelper IV

      How would you do it? As it's not working for me.

  • What's the Dax for this as a measure or column as I can't get the Quick measure calculation to do what I want.

    • Anonymous's avatar
      Anonymous
      Not applicable

      KH11NDR,

      Create a measure using DAX below.

      total sales = CALCULATE(SUM(Table[Sales]),FILTER(ALL(Table[Date]),Table[Date]<=MAX(Table[Date])))



      Regards,
      Lydia