Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Luzadriana255
Helper II
Helper II

Problem to calculate cumulative value for products

Hello,
I am trying to determine the cumulative quantity of products that I receive over time. For example, for the year 2022. However, the correct values are not displayed. In the table, I show the values that I receive that are not correct. I am using the following formula:

 

Acummulative Amount =

CALCULATE(

    SUM('Table'[Amount Product ]),

    FILTER(

        ALLSELECTED('Table'),

        'Table'[Date] <= MAX('Table'[Date])

    )

)

 

 

Could you please tell me what I should change in the formula?

 

Thank you very much for your advice.

 

Product

Year

Month

Amount

Acummulative Amount

SRE

2022

Januar

78

211

SRE

2022

Februar

84

423

SRE

2022

März

61

651

SRE

2022

April

46

797

SRE

2022

Mai

45

979

SRE

2022

Juni

34

1115

SRE

2022

Juli

29

1288

SRE

2022

August

26

1453

SRE

2022

September

14

1639

SRE

2022

Oktober

26

1809

SRE

2022

November

33

1940

SRE

2022

Dezember

0

 

HGT

2022

Januar

4

180

HGT

2022

Februar

12

379

HGT

2022

März

19

651

HGT

2022

April

11

782

HGT

2022

Mai

25

979

HGT

2022

Juni

16

1115

HGT

2022

Juli

15

1288

HGT

2022

August

21

1457

HGT

2022

September

22

1656

HGT

2022

Oktober

15

1806

HGT

2022

November

20

1940

HGT

2022

Dezember

0

 

TRA

2022

Januar

69

204

TRA

2022

Februar

71

423

TRA

2022

März

62

651

TRA

2022

April

24

797

TRA

2022

Mai

44

979

TRA

2022

Juni

40

1115

TRA

2022

Juli

56

1288

TRA

2022

August

48

1453

TRA

2022

September

106

1661

TRA

2022

Oktober

51

1806

TRA

2022

November

21

1947

TRA

2022

Dezember

0

 

ZWI

2022

Januar

2

118

ZWI

2022

Februar

2

360

ZWI

2022

März

3

540

ZWI

2022

April

5

774

ZWI

2022

Mai

4

843

ZWI

2022

Juni

3

1115

ZWI

2022

Juli

1

1129

ZWI

2022

August

5

1432

ZWI

2022

September

1

1536

ZWI

2022

Oktober

7

1793

ZWI

2022

November

10

1947

ZWI

2022

Dezember

0

 

DSU

2022

Januar

51

211

DSU

2022

Februar

38

424

DSU

2022

März

75

651

DSU

2022

April

57

797

DSU

2022

Mai

62

979

DSU

2022

Juni

41

1115

DSU

2022

Juli

72

1288

DSU

2022

August

69

1457

DSU

2022

September

60

1661

DSU

2022

Oktober

49

1809

DSU

2022

November

51

1947

DSU

2022

Dezember

0

 

 

4 REPLIES 4
Luzadriana255
Helper II
Helper II

Thank you, it works on the individual level of products. But unfortunatly I still have Problems when trying to graph all products together. The values are completely different. 

Can you please show a example?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@andhiii079845 here an screeshot when I select all the products and one when I just select one. Like you can see the acumulative values for all the products, do not match the results on the upper graph. Do you have an Idea what is happening when trying to add up all the products into a graph? Thank you!

Luzadriana255_0-1677832055350.png

Luzadriana255_1-1677832092556.png

 

 

andhiii079845
Super User
Super User

Try this:
https://community.powerbi.com/t5/DAX-Commands-and-Tips/cumulative-sum-by-date-and-product/td-p/19738...

 

Like this: 

Cumulative Value = 
VAR varDate = SELECTEDVALUE('Table'[Date])
RETURN
    CALCULATE(
        'Table'[Amount Product ],
        'Table'[Date] <= varDate
    )

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors