Forum Discussion
clmigeon
5 years agoFrequent Visitor
multi sum with cumulative value
Hi ,
Thank for your help you provid me on a other matter.
I realise that my problem is more complicat .
in fact i have :
| Noaccount | Nojourn | Credit | devit | date | sc |
| 51120 | 40 | 50000 | 0 | 01/01/2020 | TOTO |
| 51120 | 16 | 500 | 0 | 01/01/2020 | TOTO |
| 51120 | 16 | 0 | -200 | 01/02/2020 | TOTO |
| 51120 | 16 | 400 | 0 | 01/02/2020 | TOTO |
| 45200 | 16 | 500 | 0 | 01/04/2020 | TOTO |
| 45200 | 16 | 0 | -200 | 01/02/2020 | TOTO |
| 45200 | 16 | 400 | 0 | 01/01/2020 | TOTO |
| 45200 | 16 | 0 | -500 | 01/02/2020 | TOTO |
| 45200 | 16 | 400 | 0 | 01/01/2020 | TATA |
| 45200 | 16 | 0 | -500 | 01/02/2020 | TATA |
| 51120 | 40 | 50000 | 0 | 01/01/2020 | TATA |
| 51120 | 16 | 500 | 0 | 01/01/2020 | TATA |
And I want that a repport like
| SC | Noaccount | 01/01/2020 | 01/02/2020 | 01/03/2020 |
| TATA | 51120 | 50500 | ||
| 45200 | 400 | -100 | ||
| TOTO | 51120 | 50500 | 50900 | |
| 45200 | 400 | -300 | 200 |
Hi clmigeon ,
To what I can see you want the calculation to be cumulative in this case try the following measure:
Measure = CALCULATE(SUM('Table'[Credit]) + SUM('Table'[devit]), FILTER(ALL('Table'[date]) , 'Table'[date] <= MAX('Table'[date])))then use a matrix visualization:
4 Replies
- MFelixSuper User
Hi clmigeon ,
This is not a calculated column you need to create a measure. Right click on the table but instead of adding a new column add a new measure.
Also taking into attention you have a column with transaction that basically is the credit/debit you can redo your measure to:
Measure = CALCULATE(SUM('Feuil1'[Transaction]), FILTER(ALL('Feuil1'[1/1/2020]) , 'Feuil1'[1/1/2020] <= MAX('Feuil1'[1/1/2020])))