- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Help with measures - when half of the data is in old system and rest in new System for One Project?
Hi All,
I have a Projects (ABC001) whose where half of data (Jul 2024 to Feb 2025)is in old system and from Mar2025 the data will be in "NewSystem" .
How can I combine the two data to give the total value for PTD - Billed (Ex- GST).
Please suggest.
I
PTD - Billed(Ex-GST) =
var _max = max(vFactBudgetActuals[Transaction Date])
RETURN
SWITCH(
SELECTEDVALUE(Projects[DataSource]),
"OldSystem",CALCULATE([Revenue Amount] - Sum(vFactBudgetActuals[Cost Amount]),vFactBudgetActuals[Service ID] = "REVENUE",
FILTER(SM,SM[Service Group Level 0] ="REVENUE"),
//FILTER(ALL('Date'),'Date'[Date] <= _max)
FILTER(all('Date'),'Date'[Date] <=max('Date'[Date]))
//FILTER('Date','Date'[Year] <=SELECTEDVALUE('Date'[Year]) && 'Date'[Month] <= SELECTEDVALUE('Date'[Month])
)
,
"NewSystem",
CALCULATE(SUM(PJC[TOTAMTSR]),
FILTER(all('Date'),'Date'[Date] <=max('Date'[Date]))
,
PJC[CATEGORY] = "REVENUE"
)
)
Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @ashmitp869 - I have modified the above measure, can you please try the below one.
PTD - Billed(Ex-GST) =
VAR _maxDate = MAX(vFactBudgetActuals[Transaction Date])
VAR OldSystemRevenue =
CALCULATE(
[Revenue Amount] - SUM(vFactBudgetActuals[Cost Amount]),
vFactBudgetActuals[Service ID] = "REVENUE",
FILTER(SM, SM[Service Group Level 0] = "REVENUE"),
FILTER(ALL('Date'), 'Date'[Date] <= _maxDate && 'Date'[Date] <= DATE(2025,2,28)) -- Up to Feb 2025
)
VAR NewSystemRevenue =
CALCULATE(
SUM(PJC[TOTAMTSR]),
FILTER(ALL('Date'), 'Date'[Date] <= _maxDate && 'Date'[Date] >= DATE(2025,3,1)), -- From Mar 2025 onward
PJC[CATEGORY] = "REVENUE"
)
RETURN
OldSystemRevenue + NewSystemRevenue
Hope it works. please check.
Proud to be a Super User! | |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @ashmitp869 - I have modified the above measure, can you please try the below one.
PTD - Billed(Ex-GST) =
VAR _maxDate = MAX(vFactBudgetActuals[Transaction Date])
VAR OldSystemRevenue =
CALCULATE(
[Revenue Amount] - SUM(vFactBudgetActuals[Cost Amount]),
vFactBudgetActuals[Service ID] = "REVENUE",
FILTER(SM, SM[Service Group Level 0] = "REVENUE"),
FILTER(ALL('Date'), 'Date'[Date] <= _maxDate && 'Date'[Date] <= DATE(2025,2,28)) -- Up to Feb 2025
)
VAR NewSystemRevenue =
CALCULATE(
SUM(PJC[TOTAMTSR]),
FILTER(ALL('Date'), 'Date'[Date] <= _maxDate && 'Date'[Date] >= DATE(2025,3,1)), -- From Mar 2025 onward
PJC[CATEGORY] = "REVENUE"
)
RETURN
OldSystemRevenue + NewSystemRevenue
Hope it works. please check.
Proud to be a Super User! | |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Can you also help with the MTD and YTD expression as well
MTD - Billed(Ex-GST) =
SWITCH(
SELECTEDVALUE(Projects[DataSource]),
"OldSystem",CALCULATE([Revenue Amount] - Sum(vFactBudgetActuals[Cost Amount]),vFactBudgetActuals[Service ID] = "REVENUE")
,
"NewSystem",
CALCULATE(
TOTALMTD(
SUM(PJC[TOTAMTSR]),
'Date'[Date],
FILTER(PJC, PJC[CATEGORY] = "REVENUE")
)
)
)
YTD - Billed(Ex-GST) =
SWITCH(
SELECTEDVALUE(Projects[DataSource]),
"OldSystem",CALCULATE([Revenue Amount] - Sum(vFactBudgetActuals[Cost Amount]),vFactBudgetActuals[Service ID] = "REVENUE" ,
DATESYTD('Date'[Date],"6/30"),
FILTER(SM,SM[Service Group Level 0] ="REVENUE"))
,
"NewSystem",
CALCULATE(
SUM(PJC[TOTAMTSR]),
DATESYTD('Date'[Date], "6/30"),
FILTER(PJC, PJC[CATEGORY] = "REVENUE")
)
)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @ashmitp869 - Your MTD (Month-to-Date) and YTD (Year-to-Date) calculations for Billed (Ex-GST) are mostly correct.
I have updated few please check the below:
MTD - Billed(Ex-GST) =
VAR _selectedDataSource = SELECTEDVALUE(Projects[DataSource])
RETURN
SWITCH(
_selectedDataSource,
"OldSystem",
CALCULATE(
[Revenue Amount] - SUM(vFactBudgetActuals[Cost Amount]),
vFactBudgetActuals[Service ID] = "REVENUE",
TOTALMTD(SUM([Revenue Amount]), 'Date'[Date]) -- Apply Month-to-Date filter
),
"NewSystem",
CALCULATE(
TOTALMTD(
SUM(PJC[TOTAMTSR]),
'Date'[Date]
),
PJC[CATEGORY] = "REVENUE"
)
)
for YTD:
YTD - Billed(Ex-GST) =
VAR _selectedDataSource = SELECTEDVALUE(Projects[DataSource])
RETURN
SWITCH(
_selectedDataSource,
"OldSystem",
CALCULATE(
[Revenue Amount] - SUM(vFactBudgetActuals[Cost Amount]),
vFactBudgetActuals[Service ID] = "REVENUE",
DATESYTD('Date'[Date], "6/30") -- Apply Year-to-Date filter
),
"NewSystem",
CALCULATE(
SUM(PJC[TOTAMTSR]),
DATESYTD('Date'[Date], "6/30"),
PJC[CATEGORY] = "REVENUE"
)
)
Hope this works at your end. please check and confirm.
Proud to be a Super User! | |

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
04-10-2024 06:00 PM | |||
01-22-2024 12:49 AM | |||
03-11-2024 08:13 AM | |||
11-30-2021 02:22 AM | |||
09-16-2022 05:01 AM |
User | Count |
---|---|
87 | |
81 | |
53 | |
38 | |
35 |