This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hi,
Need help on getting rolling MTD value.
I have the source data attached here, need to filter only the DayName(Date) = Monday, the data is avliable on weekly.
Need output for WeekValue, RollingWeekValue, Month-to-date for the selected week, and Rolling Month-to-Date.
Here am unable to acheive to get Rolling Month-to-Date.
Need help on code for get rolling MTD value based on MTD column.
Rolling Week Value =
CALCULATE (
[Value],
FILTER (
ALLSELECTED ( 'Date' ),
'Date'[Date] <= MAX ( 'Date'[Date] )
)
)
MTD Value = CALCULATE(SUM(Value),'Date'[FiscalYear] = SELECTEDVALUE('Date'[FiscalYear]),'Date'[FiscalMonthNumber]=SELECTEDVALUE('Date'[FiscalMonthNumber]),'Date'[Date]<=SELECTEDVALUE('Date'[FiscalWeekEnd]))
Need output to get Rolling MTD value highlighted below.
| Date | Day | Value |
| 28-04-2025 00:00 | Mon | 804.28 |
| 05-05-2025 00:00 | Mon | 2937.27 |
| 12-05-2025 00:00 | Mon | 1057.96 |
| 19-05-2025 00:00 | Mon | 1714.2 |
| 26-05-2025 00:00 | Mon | 5802.43 |
| 27-05-2025 00:00 | Tue | 43.53 |
| 28-05-2025 00:00 | Wed | 2334.93 |
| 29-05-2025 00:00 | Thu | 172.35 |
| 30-05-2025 00:00 | Fri | 42.99 |
| 31-05-2025 00:00 | Sat | 3118 |
| 02-06-2025 00:00 | Mon | 2834.43 |
| 09-06-2025 00:00 | Mon | 1295.66 |
| 16-06-2025 00:00 | Mon | 4455.44 |
| 23-06-2025 00:00 | Mon | 1981.1 |
| 24-06-2025 00:00 | Tue | 4453.32 |
| 25-06-2025 00:00 | Wed | 985.11 |
| 26-06-2025 00:00 | Thu | 732.95 |
| 27-06-2025 00:00 | Fri | 509.76 |
| 28-06-2025 00:00 | Sat | -275.61 |
| 29-06-2025 00:00 | Sun | -5500 |
| 30-06-2025 00:00 | Mon | 186.43 |
| 07-07-2025 00:00 | Mon | 2602.33 |
| 14-07-2025 00:00 | Mon | 1482.63 |
Solved! Go to Solution.
Hi again,
now this result
It matches yours apart from Fiscal week 4, but I think the above value is the correct one, am I right? Your value is 11,313
Code
File attached
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
HI @SP_1
modified the code accordingly. File attached
Best
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi @SP_1
I could not replicate what you ask because I would need the association of your fiscal months to the dates which you did not provide
I obtained this
with this code (I created a 'Date' table )
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your threadWant to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi @FBergamaschi ,
Thank you for your help. However, the output does not match my expectations. Please refer to the attached sample file (link below). Thanks in advance.
https://www.dropbox.com/scl/fi/4tnlqv4re2rm9y9kpcpnx/Rolling-MTD.pbix?rlkey=nw1kd122d5fw6bbeo28zdbn3...
I expect the output to match the highlighted (Yellow) result.
Hi again,
now this result
It matches yours apart from Fiscal week 4, but I think the above value is the correct one, am I right? Your value is 11,313
Code
File attached
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi @FBergamaschi ,
It worked perfectly - thanks you for your help! This is exactly the result I was expecting. I’ve replicated the same in my PBIX file, and it’s working as expected. Once again, many thanks for your support.
Will the same code work for quarter and year as well? I’m currently trying to modify it for quarterly and yearly calculations.
Thanks.
Hi @FBergamaschi ,
I’m able to see the Rolling MTD value in a table visual only when the Date field is included along with the Rolling MTD measure. Otherwise, it doesn’t appear in either the table or other visuals. I want to display this rolling data by Week and Month (with Week/Month on the X-axis and values on the Y-axis), but I’m not sure how to fix this. Please help.
HI @SP_1
modified the code accordingly. File attached
Best
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |