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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
12400727
Frequent Visitor

Sum Cumulative by Date

 

Hello

How can i achive that if I filter a date, it makes me the sum the amounts of the three months forward, and in a table it shows me the year, the months and the sum of the amounts by months, for example, if I filter 01/01/2021, show me the sums of the quantities in the months, January, February and March 2021, i did measurement, which does this to me, but the table does not show me the months these sums of quantities correspond.

 

Measure

12400727_0-1627911997051.png

Table

12400727_1-1627912095108.png

Date Filter

12400727_2-1627912142427.png

 

 Pleas your help

 

Best Regard

 

Hernando

1 ACCEPTED SOLUTION

Hi @12400727

 

Try measure as:

SUMX(
    FILTER(
        ALL(Table1),
        Table1[Customer])=MAX(Table1[Customer])
    ),
    [3 Meses]
)

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

View solution in original post

11 REPLIES 11
v-xulin-mstf
Community Support
Community Support

Hi @12400727,

 

Is your issue solved? If the issue has been solved, please adopt the solution to help others.

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

 

 

v-xulin-mstf
Community Support
Community Support

Hi @12400727,

 

You can create a calculated table as:

Table2 = 
VALUES('Table1'[Date])

Create measure as:

Measure = 
CALCULATE( 
    SUM('Table1'[Value]),
    DATESBETWEEN(
         'Table1'[Date], 
          ALLSELECTED('Table2'[Date]), 
          DATEADD(ALLSELECTED('Table2'[Date]),2,MONTH)
        )
)

Here is the output:

vxulinmstf_0-1628066304415.png

The pbix is attached, please try it.

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

 

Hi

i craeted two measurement:

1.

12400727_0-1628116107732.png

2.

12400727_1-1628116167668.png

Table Result:

12400727_2-1628116389822.png

Selected Date

12400727_3-1628116662626.png

i see the value 409 that corresponds to three months forward to the selected date, but my request is in order see in the table the years and the months that corresponds to the Three months forward, for example, if i select 03/07/2020, shows me the below image.

12400727_4-1628118567472.png

What can i do?

 

Thanks

 

 

 

Hi @12400727

 

Is this what you want?

vxulinmstf_0-1628127629488.png

The demo is attached, please try it.

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

 

Hi 

Thanks for your help, i applied already your solution, but i have a quiestion for you, how can i apply a sum by customer, for example like you see the table below

The customer Carolina Marín Garcia has two records with value equal 2, but i want show the value 4, i want sum both records. 

12400727_0-1628552352676.png

The measure called Recambio is the below

12400727_1-1628552436615.png

I gratefull your help.

 

Best regards

 

Hernando.

Hi @12400727

 

Try measure as:

SUMX(
    FILTER(
        ALL(Table1),
        Table1[Customer])=MAX(Table1[Customer])
    ),
    [3 Meses]
)

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

Hi

i got an error, but i don't know what is the error. please help

 

12400727_0-1628568704822.png

Best regards.

 

Hi @12400727,

 

Your code has a formatting error.

vxulinmstf_0-1628573516080.png

Please refer: https://docs.microsoft.com/en-us/dax/sumx-function-dax

If you still have some question, please don't hesitate to let me known.‌‌

 

Best Regards,

Link

 

Is that the answer you're looking for? If this post helps, then please consider Accept it as the solution. Really appreciate!

 

 

negi007
Community Champion
Community Champion

@12400727  Below article can help you in creating a mesure to calculate running total

 

for future months

https://community.powerbi.com/t5/Desktop/running-sum-of-future-3-month-data/m-p/663335

 

for past months, much more detailed here

https://www.goodly.co.in/running-total-power-bi/

 




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



Proud to be a Super User!


Follow me on linkedin

Hi 

i already made the two measurements, and pleaced them in a table, however i do not see the expected result, it is not adding the next three months when i filter the date in the slicer.

For example i select the date 

12400727_0-1627946160908.png

 

And the table shows the next

12400727_1-1627946201548.png

It is showing the quantity of the day selected (3), and the quantities of the month of the selected day (166).

i should see the sum of the three months following the selected day, only is showing the month of january.

 

Hi neggi007

 

I have a question for you, what i should put om what is highlighted in yellow?

12400727_0-1627919610357.png

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors