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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Becky
New Member

Cumulative YTD total

Power BI example.PNGHello – I am new to power BI/Query and am trying to create my first dashboard. I have a simple set of data with 4 columns – date, customer, actual amount, and planned amount.  I also create a date table.  In terms of dates, my sample is only pulled on a monthly basis so the dates in my original data set would be 1/1/19, 2/1/19, 3/1/19, etc.  I am trying to build a cumulative YTD total for the actual amount, but the formula keeps returning the monthly value instead of the cumulative value (see orange line below).  For example, if January had an amount of 100 and February was 150, then my cumulative totals should show 100 for Jan and 250 for Feb.  Instead I see 100 in Jan and 150 in Feb.

 

Does anyone know how to adjust the formula to calculate the cumulative amount?   Here is the formula I was using:

Cumulative Actual = CALCULATE (sum ('Becky - Upload'[Actual]), DATESYTD('Date Table'[Date].[Date]))

 

 
3 REPLIES 3
Nathaniel_C
Super User
Super User

Hi @Becky ,

Cumulative Actual = TOTALYTD('Becky - Upload'[Actual],'Date Table'[Date])




Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





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

Proud to be a Super User!




Hi @Becky ,

Using my tables.
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Sales ytd.PNG

 





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

Proud to be a Super User!




VasTg
Memorable Member
Memorable Member

@Becky 

 

Try this.

 

Cumulative Actual = CALCULATE(SUM('Becky - Upload'[Actual]),FILTER(ALL('Becky - Upload'),'Becky - Upload'[Date]<=MAX(''Date Table'[Date])))

 

Let us know if it works.

Connect on LinkedIn

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors