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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
ashmitp869
Responsive Resident
Responsive Resident

Need help with YTD measures.

Hi All,

I have a Projects (ABC001) whose where half of data (Jul 2024 to 21 Feb 2025)is in old system and from (22 Feb 2025 to project ends) the data will be in "NewSystem" .
How can I combine the two data to give the total value  for YTD - Billed (Ex- GST) 

 

Please suggest.

YTD - Billed(Ex-GST) TEST = 
VAR _maxDate = MAX(vFactBudgetActuals[Transaction Date])

VAR OldSystemRevenue =
CALCULATE(
[Revenue Amount] - SUM(vFactBudgetActuals[Cost Amount]),
vFactBudgetActuals[Service ID] = "REVENUE",
DATESYTD('Date'[Date], "6/30") -- Apply Year-to-Date filter
)

VAR NewSystemRevenue =
CALCULATE(
SUM(PJC[TOTAMTSR]),
DATESYTD('Date'[Date], "6/30"),
PJC[CATEGORY] = "REVENUE"
)

RETURN
OldSystemRevenue + NewSystemRevenue

 

 

@rajendraongole1 please kindly review the measure. Thanks

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@ashmitp869 you have similar post, check reply on the another post.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @ashmitp869 ,

 

I suggest you check that the DATESYTD('Date'[Date], "6/30") in your DAX is returning the date range you want. Normally, when you specify a year-end date in the DATESYTD function, that date is considered the new year-end date. Therefore, the function calculates the new year-start date from the day after the specified year-end date. For example, if you specify a year-end date of June 30, the new year-start date will be July 1. According to your needs, I recommend you to use DATESBETWEEN.

 

YTD - Billed(Ex-GST) TEST = 
VAR _maxDate = MAX(vFactBudgetActuals[Transaction Date])

VAR OldSystemRevenue =
CALCULATE(
[Revenue Amount] - SUM(vFactBudgetActuals[Cost Amount]),
vFactBudgetActuals[Service ID] = "REVENUE",
DATESBETWEEN('Date'[Date],DATE(2024,7,1),DATE(2025,2,21))
)

VAR NewSystemRevenue =
CALCULATE(
SUM(PJC[TOTAMTSR]),
DATESBETWEEN('Date'[Date],DATE(2025,2,22),MAXX(ALL('Date'),'Date'[Date]))),
PJC[CATEGORY] = "REVENUE"
)

RETURN
OldSystemRevenue + NewSystemRevenue

 

 

 

 

 

——————————————————————————————————————————————————

If my answer helps you solve the problem, please accept my answer as a solution and let it be seen by more people in need.

 

Best regards,

Mengmeng Li

 

 

parry2k
Super User
Super User

@ashmitp869 you have similar post, check reply on the another post.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.