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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
eliasayyy
Memorable Member
Memorable Member

create chart that accumulates values over date

hello everyone here i have an example of my table:

Date                      Value

12/22/2022          -1
12/23/20223
12/27/2022-9
12/28/20228
12/29/20222
12/30/2022-4
1/2/20237
1/3/20230
1/4/20232
1/5/2023-10
1/6/2023-10
1/7/2023-6
1/8/2023-3
1/9/2023-9
1/10/20236
1/11/2023-9
1/12/20235

 

i am getting this result

annonymous1999_0-1673546180722.png

 

what i want is a chart that accumualtes values from min selected date till max selected date so from december 22 2022 till january 2 2022

so it will be something like
dec 22 value = -1
dec 23 value = -1 + 3 = 2
dec 24 value = -1 + 3 - 9 = -7
....

 

2 ACCEPTED SOLUTIONS

HI

thanks for clarifying

 

have updated this file: https://1drv.ms/u/s!AkGuKJKxOlnAeqVqsn2-BsSfKWM?e=n2BZNW

 

this is the measure:

 

cumulative total =

VAR LastVisibleDate =
    MAX ( 'Table'[Dates] )
VAR FirstVisibleDate =
    MIN ( 'Table'[Dates] )
VAR LastDateWithSales =
    CALCULATE (
        MAX ( 'Table'[Dates] ),
        REMOVEFILTERS ()  -- Use ALL ( Sales ) if REMOVEFILTERS () and ALL ()
                           -- are not available
    )
VAR Result =
    IF (
        FirstVisibleDate <= LastDateWithSales,
        CALCULATE (
            [value],
           'Table'[Dates] <= LastVisibleDate
        )
    )
RETURN
    Result
 
 
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

View solution in original post

Anonymous
Not applicable

Hi @eliasayyy ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

Create a measure.

Measure = VAR _MAX=MAXX(ALLSELECTED('Table'),'Table'[DATE])
VAR _MIN=MINX(ALLSELECTED('Table'),'Table'[DATE])
RETURN
CALCULATE(SUM('Table'[VALUE]),FILTER(ALL('Table'),'Table'[DATE]<=SELECTEDVALUE('Table'[DATE])&&'Table'[DATE]>=_MIN&&'Table'[DATE]<=_MAX))

vpollymsft_0-1673574370727.pngvpollymsft_1-1673574391865.png

The value would change by the date.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @eliasayyy ,

I have created a simple sample, please refer to my pbix file to see if it helps you.

Create a measure.

Measure = VAR _MAX=MAXX(ALLSELECTED('Table'),'Table'[DATE])
VAR _MIN=MINX(ALLSELECTED('Table'),'Table'[DATE])
RETURN
CALCULATE(SUM('Table'[VALUE]),FILTER(ALL('Table'),'Table'[DATE]<=SELECTEDVALUE('Table'[DATE])&&'Table'[DATE]>=_MIN&&'Table'[DATE]<=_MAX))

vpollymsft_0-1673574370727.pngvpollymsft_1-1673574391865.png

The value would change by the date.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

adudani
Super User
Super User

hi @eliasayyy ,

 

 

Try this solution:

 

https://1drv.ms/u/s!AkGuKJKxOlnAeaeLxBPZXb_-Lx4?e=mEyo9q

 

 

Appreciate a thumbs up if this is helpful.

 

Please accept this as the solution if your question is resolved.

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

hello @adudani i already have this metric thank you but i want an accumulted value of the sum so for example the sum of values on dec 22 was -1 then on dec 23 the number was 3 and in dec 27 value was -9 so in theory the graph value should show
dec 22 = -1
dec 23 = 2
dec 27 = -7

HI

thanks for clarifying

 

have updated this file: https://1drv.ms/u/s!AkGuKJKxOlnAeqVqsn2-BsSfKWM?e=n2BZNW

 

this is the measure:

 

cumulative total =

VAR LastVisibleDate =
    MAX ( 'Table'[Dates] )
VAR FirstVisibleDate =
    MIN ( 'Table'[Dates] )
VAR LastDateWithSales =
    CALCULATE (
        MAX ( 'Table'[Dates] ),
        REMOVEFILTERS ()  -- Use ALL ( Sales ) if REMOVEFILTERS () and ALL ()
                           -- are not available
    )
VAR Result =
    IF (
        FirstVisibleDate <= LastDateWithSales,
        CALCULATE (
            [value],
           'Table'[Dates] <= LastVisibleDate
        )
    )
RETURN
    Result
 
 
Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.