Forum Discussion
compounding values for dates
- Anonymous9 years ago
Bimster,
Firstly, unpivot your columns in your table, rename the blank column to "Stock".
Secondly, create a column using the DAX below.
Column = CALCULATE(SUM(Table[Value]),ALLEXCEPT(Table,Table[Stock]),Table[Attribute]<=EARLIER(Table[Attribute]))
Thirdly, create a Matrix visual as shown in the following capture.
Regards,
Lydia
Hi MFelix,
The formula is good but I don't think it's quite right for what I need. The data for 03/06/2017 should be (for each stock) the figure calculated for 02/06/2017 (i.e. sum of 01/06/2017's value and 02/06/2017's value) added to the figure for 03/06/2017
| 01/06/2017 | 02/06/2017 | 03/06/2017 | |
| Stock 1 | 10 | 30 | 53 |
| Stock 2 | 15 | 25 | 34 |
Bimster,
Firstly, unpivot your columns in your table, rename the blank column to "Stock".
Secondly, create a column using the DAX below.
Column = CALCULATE(SUM(Table[Value]),ALLEXCEPT(Table,Table[Stock]),Table[Attribute]<=EARLIER(Table[Attribute]))
Thirdly, create a Matrix visual as shown in the following capture.
Regards,
Lydia